plH.vue
20.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
<template>
<div>
<el-dialog v-dialogDrag :close-on-click-modal="false"
title="新增"
:visible.sync="isVisible"
width="70%"
@close="close"
:modal-append-to-body="false"
>
<div>
<table border="1">
<tr>
<td colspan="2">建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.jzmj" class="inputtitle"/></td>
<td colspan="2">套内建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.tnjzmj" class="inputtitle"/></td>
</tr>
<tr>
<td colspan="2">分摊建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.ftjzmj" class="inputtitle"/></td>
<td colspan="2">地下部分建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.dxbfjzmj" class="inputtitle"/></td>
</tr>
<tr>
<td colspan="2">其他建筑面积(㎡)</td>
<td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td>
<td colspan="2">分摊系数</td>
<td colspan="4"><input type="text" v-model="form.ftxs" class="inputtitle"/></td>
</tr>
<tr>
<td colspan="2">户型</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.hxbsm">
<el-option
v-for="i in $store.state.hxList"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td colspan="2">户型结构</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.hxjgbsm">
<el-option
v-for="i in $store.state.hxjgList"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">共有土地面积(㎡)</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.gytdmj"/></td>
<td colspan="2">分摊土地面积(㎡)</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.fttdmj"/></td>
</tr>
<tr>
<td colspan="2">独有土地面积(㎡)</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.dytdmj"/></td>
<td colspan="2">房屋类型</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.fwlxbsm">
<el-option
v-for="i in $store.state.fwlxList"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">产别</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.fwcbbsm">
<el-option
v-for="i in $store.state.cbOptions"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td colspan="2">产权来源</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.fwcqlybsm">
<el-option
v-for="i in $store.state.cqlyOptions"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">房屋性质</td>
<td colspan="4">
<el-select class="selectTitle" v-model="form.fwxzbsm">
<el-option
v-for="i in $store.state.fwxzOptions"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
<td colspan="2"></td>
<td colspan="4"></td>
</tr>
<tr>
<td colspan="2">房屋结构</td>
<td colspan="5">
<el-select class="selectTitle" v-model="form.fwjgbsm">
<el-option
v-for="i in $store.state.fwjgList"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</td>
</tr>
<tr height="30" v-for="(item1,index) in form.fwytList" :key="index">
<td v-if="index===0" colspan="2" :rowspan="ytTitleRowspan" align="center" id="ytTitle">
<i class="iconfont iconicon-test2" style="margin-right: 10px;color:#66b1ff;font-size:30px" @click="addYtInfo"></i>
<span>用途</span>
</td>
<td width="30" colspan="1" align="center" >
<i class="iconfont iconicon-test" style="color:#FA6400;font-size:30px" @click="deleteYtInfo(index)"></i>
规划用途
</td>
<td width="30" colspan="4" align="center" >
<el-select-tree
v-if="show"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
:placeholder="placeholder"
:disabled="disabled"
:data="$store.state.fwytList"
:props="treeProps"
:check-strictly="checkStrictly"
:clearable="clearable"
v-model="item1.fwytzdbsm"
></el-select-tree>
</td>
<td width="30" colspan="1" align="center" >用途</td>
<td width="30" colspan="4" align="center" >
<el-select-tree
v-if="show"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
:placeholder="placeholder"
:disabled="disabled"
:data="$store.state.fwytList"
:props="treeProps"
:check-strictly="checkStrictly"
:clearable="clearable"
v-model="item1.fwsjytbsm"
></el-select-tree>
</td>
</tr>
<tr height="30" v-for="(item1,index) in form.fwjgList" :key="'jg'+index">
<td colspan="2" v-if="index===0" :rowspan="fwjgTitleRowspan" align="center" >
<i class="iconfont iconicon-test2" style="margin-right: 10px;color:#66b1ff;font-size:30px" @click="addFwjgInfo"></i>
<span>房屋结构</span>
</td>
<td colspan="1" align="center" >
<i class="iconfont iconicon-test" style="margin-right: 10px;color:#FA6400;font-size:30px" @click="deleteFwjgInfo(index)"></i>
<span>删除</span>
</td>
<td colspan="9" >
<el-select v-model="item1.fwjgzdbsm" placeholder="请选择" >
<el-option
v-for="item in $store.state.fwjgList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm">
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="12" rowspan="4" align="center">
<Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz>
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td colspan="2">东墙体归属</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.dqtgs"/></td>
<td colspan="2">南墙体归属</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.nqtgs"/></td>
</tr>
<tr>
<td colspan="2">西墙体归属</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.xqtgs"/></td>
<td colspan="2">北墙体归属</td>
<td colspan="4"><input type="text" class="inputtitle" v-model="form.bqtgs"/></td>
</tr>
</table>
</div>
<div class="shop">
<el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="reset" icon="el-icon-refresh">重置</el-button>
<el-button type="primary" @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Qlxz from "@components/formMenu/qlxz";
import {batchUpdateQjH} from "@api/h";
export default {
name: "plH",
components:{
Qlxz
},
props: {
bsms: {
type: Array
},
plhVisible: {
type: Boolean,
default: false
}
},
data() {
return {
//树型结构
show:true,
clearable: true,
defaultExpandAll: true,
multiple: false,
placeholder: '请选择',
disabled: false,
checkStrictly: true,
treeProps: {
value: 'bsm',
children: 'children',
label: 'mc'
},
form:{
qszt:'0',
jzmj:'',
tnjzmj:'',
ftjzmj:'',
dxbfjzmj:'',
qtjzmj:'',
ftxs:'',
hxbsm:'',
hxjgbsm:'',
gytdmj: '',
fttdmj: '',
dytdmj: '',
fwlxbsm: '',
fwcbbsm:'',
fwcqlybsm:'',
fwxzbsm:'',
dqtgs:'',
nqtgs:'',
xqtgs:'',
bqtgs:'',
fwjgbsm:'',
fwytList:[{
glbsm:'', //关联标识码
fwytzdbsm:'', //房屋用途字典标识码
sx:'', //顺序
fwsjytbsm:'', //房屋实际用途字典标识码
}],
fwjgList:[{
fwjgzdbsm:'', //房屋结构字典标识码
glbsm:'', //关联标识码
sx:'', //顺序
}],
qlxzList:[{
qlxzdm:'', //权利性质代码
glbsm:'', //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM
qlxzzdbsm:'', //权利性质字典表标识码
qlxzmc:'', //权利名称名称
zhqlxzlx:'', //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质
addQjTdytRequestList:[{
}], //土地用途新增实体列表
}]
},
isVisible: false,
hx: [{
label: '一居室',
key: '1',
value: '一居室'
}, {
label: '二居室',
key: '2',
value: '二居室'
}, {
label: '三居室',
key: '3',
value: '三居室'
}
],
ytTitleRowspan:1, //用途的单元格垂直合并数量
fwjgTitleRowspan:1, //房屋结构的单元格垂直合并数量
}
},
methods: {
lodding:function(){
this.$emit('lodding')
},
addYtInfo(){
this.form.fwytList.push({
glbsm:'',
fwytzdbsm:'',
fwsjytbsm:'',
sx:'',
});
this.ytTitleRowspan=this.form.fwytList.length;
},
deleteYtInfo(index){
if(this.form.fwytList.length<=1){
this.$message({
message: '不能删除,最少含有一条用途信息',
type: 'warning'
});
}else{
this.form.fwytList.splice(index,1);
this.ytTitleRowspan=this.form.fwytList.length;
}
},
addFwjgInfo(){
this.form.fwjgList.push({
fwjgzdbsm:'', //房屋结构字典标识码
glbsm:'', //关联标识码
sx:'', //顺序
});
this.fwjgTitleRowspan=this.form.fwjgList.length;
},
deleteFwjgInfo(index){
if(this.form.fwjgList.length<=1){
this.$message({
message: '不能删除,最少含有一条房屋结构信息',
type: 'warning'
});
}else{
this.form.fwjgList.splice(index,1);
this.fwjgTitleRowspan=this.form.fwjgList.length;
}
},
close: function () {
this.$emit('close')
this.isVisible = false
this.result()
},
reset: function () {
this.form={
qszt:'0',
jzmj:'',
tnjzmj:'',
ftjzmj:'',
dxbfjzmj:'',
qtjzmj:'',
ftxs:'',
hxbsm:'',
hxjgbsm:'',
gytdmj: '',
fttdmj: '',
dytdmj: '',
fwlxbsm: '',
fwcbbsm:'',
fwcqlybsm:'',
fwxzbsm:'',
dqtgs:'',
nqtgs:'',
xqtgs:'',
bqtgs:'',
fwjgbsm:'',
fwytList:[{
glbsm:'', //关联标识码
fwytzdbsm:'', //房屋用途字典标识码
sx:'', //顺序
fwsjytbsm:'', //房屋实际用途字典标识码
}],
fwjgList:[{
fwjgzdbsm:'', //房屋结构字典标识码
glbsm:'', //关联标识码
sx:'', //顺序
}],
qlxzList:[{
qlxzdm:'', //权利性质代码
glbsm:'', //宗地BSM、自然幢BSM、户BSM、多幢BSM、宗海BSM
qlxzzdbsm:'', //权利性质字典表标识码
qlxzmc:'', //权利名称名称
zhqlxzlx:'', //除宗海数据外,默认都是空;0:用海类型权利性质;2:海岛用途权利性质
addQjTdytRequestList:[{
}], //土地用途新增实体列表
}]
};
this.$refs.qlxzModule.reset();
this.ytTitleRowspan=1; //用途的单元格垂直合并数量
this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量
},
save: function () {
this.form['hbsms'] = this.bsms
this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
for(let i=0;i< this.form.fwjgList.length;i++){
if(this.form.fwjgList[i].fwjgzdbsm===''){
this.form.fwjgList.splice(i,1);
}
}
for(let i=0;i< this.form.fwytList.length;i++){
if(this.form.fwytList[i].fwsjytbsm===''){
this.form.fwytList.splice(i,1);
}
}
for(let i=0;i< this.form.qlxzList.length;i++){
if(this.form.qlxzList[i].qlxzdm===''){
this.form.qlxzList.splice(i,1);
}
}
console.log("批量户信息")
console.log(this.form)
batchUpdateQjH(this.form).then((res)=>{
if(res.code===200){
this.lodding()
this.$message.success("保存成功!")
this.$nextTick(()=>{
this.reset();
})
this.close();
}
})
},
cancel: function () {
this.close()
}
},
mounted() {
},
watch: {
plhVisible(val) {
this.isVisible = val
}
}
}
</script>
<style scoped>
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
table-layout: fixed;
}
td {
text-align: center;
height: 36px;
min-width: 60px;
}
table:hover {
cursor: pointer;
}
.inputtitle {
line-height: 40px;
width: 95%;
border: none;
outline: none;
height: 95%;
}
.selectTitle{
width: 100%;
border-radius: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
position: relative;
display: block;
}
.shop {
text-align: center;
margin-top: 20px;
}
/deep/.el-input__inner{
width: 100%;
border: 0;
}
</style>