addDialog.vue
11.4 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
<template>
<div style="height: 600px;overflow-y: scroll;">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="不动产单元申请书" name="1"></el-tab-pane>
<el-tab-pane label="附件" v-if="formData.isAdd==2" name="2"></el-tab-pane>
</el-tabs>
<el-form ref="ruleForm" :model="ruleForm" label-width="100px" style="height:90%" v-if="activeName==1" :rules="rules">
<div v-for="item in sqrList">
<div class="slxx_title title-block">
申请人信息
<div class="triangle"></div>
</div>
<el-row>
<el-col :span="8">
<el-form-item label="权利人名称:" prop="mc">
<el-input v-model="item.mc"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件种类:" prop="zjzl">
<el-input v-model.number="item.zjzl"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件号:" prop="zjh">
<el-input v-model.number="item.zjh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="通讯地址:" prop="txdz">
<el-input v-model="item.txdz"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮编:" prop="yb">
<el-input v-model.number="item.yb"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="共有比例:" prop="gyqk">
<el-input v-model.number="item.gyqk"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="法人名称:" prop="frmc">
<el-input v-model="ruleForm.frmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系电话:" prop="frdh">
<el-input v-model.number="ruleForm.frdh"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="代理人名称:" prop="dlrmc">
<el-input v-model.number="ruleForm.dlrmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="联系电话:" prop="dlrdh">
<el-input v-model.number="ruleForm.dlrdh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="代理机构:" prop="dljg">
<el-input v-model="ruleForm.dljg"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<div>
<div class="slxx_title title-block">
不动产情况
<div class="triangle"></div>
</div>
<el-row>
<el-col :span="12">
<el-form-item label="坐落:" prop="zl">
<el-input v-model="bdcqk.zl"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="不动产单元号:" prop="bdcdyh">
<el-input v-model.number="bdcqk.bdcdyh"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="宗地/宗海面积:" prop="zdzhmj">
<el-input v-model="bdcqk.zdzhmj"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="定着物面积:" prop="dzwmj">
<el-input v-model.number="bdcqk.dzwmj"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="宗地/宗海用途:" prop="zdzhyt">
<el-input v-model.number="bdcqk.zdzhyt"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="定着物用途:" prop="dzwyt">
<el-input v-model.number="bdcqk.dzwyt"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="不动产类型:" prop="bdclx">
<el-input v-model="bdcqk.bdclx"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="宗地/宗海权力类型:" prop="zdzhqllx">
<el-input v-model="bdcqk.zdzhqllx"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="用海类型:" prop="yhlx">
<el-input v-model="bdcqk.yhlx"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="构筑物类型:" prop="gzwlx">
<el-input v-model.number="bdcqk.gzwlx"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="林种:" prop="lz">
<el-input v-model.number="bdcqk.lz"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="原不动产单元号:" prop="ybdcdyh">
<el-input v-model.number="bdcqk.ybdcdyh"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<div>
<div class="slxx_title title-block">
抵押情况
<div class="triangle"></div>
</div>
<el-row>
<el-col :span="12">
<el-form-item label="被担保主债权数额:" prop="bdbzzqse">
<el-input v-model="bdcqk.bdbzzqse"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="在建建筑物抵押范围:" prop="zjjzwdyfw">
<el-input v-model.number="bdcqk.zjjzwdyfw"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="债务履行起始时间:" prop="zwlxqssj">
<el-input v-model="bdcqk.zwlxqssj"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="债务履行结束时间:" prop="zwlxjssj">
<el-input v-model="bdcqk.zwlxjssj"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<el-form-item style="text-align:center">
<!-- <el-button type="primary" @click="closeDialog">关闭</el-button>-->
<!-- <el-button type="primary" @click="submitForm">保存</el-button>-->
</el-form-item>
</el-form>
<clxx v-if="activeName==2" :formData="formData" />
</div>
</template>
<script>
import store from '@/store/index.js'
import { getSqr, getBdcqk } from "@/api/ycsl.js"
import clxx from './clxx/index.vue'
export default {
props: {
formData: {
type: Object,
default: () => { },
},
},
components: {
clxx
},
data () {
return {
zjzlList: store.getters.dictData['A30'],
activeName: "1",
DJJGLIST: store.getters.dictData['ywly'],
readOnly: false,
sqrList:[{}],
bdcqk: {},
//表单提交数据
ruleForm: {},
//表格数据
tableForm: [
{
name: '不动产权证书',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx: 1
},
{
name: '不动产登记证明',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx: 2
}
],
rules: {
}
}
},
mounted () {
console.log(this.formData, "ffffffffffffff")
if (this.formData.ywh) {
this.getSqr(this.formData.ywh)
this.getBdcqk(this.formData.ywh)
}
let list = Object.keys(this.formData).length
if (list > 0) {
this.ruleForm = this.formData
}
},
methods: {
handleClick () { },
/**
* @description: 表单提交
* @author:
*/
submitForm () {
let that = this
this.tableForm.forEach((item, index) => {
if (item.bs < 0) {
return;
}
})
if (this.formData.isAdd != 1) {
store.dispatch("user/refreshPage", false);
update(this.ruleForm).then(res => {
if (res.code == 200) {
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs['ruleForm'].resetFields();
this.resetTableFields();
this.closeDialog();
//刷新列表
store.dispatch("user/refreshPage", true);
} else {
this.$message.error(res.message);
}
})
} else {
that.$refs['ruleForm'].validate((valid) => {
if (valid) {
store.dispatch("user/refreshPage", false);
addQy(this.ruleForm).then(res => {
if (res.code == 200) {
that.$message.success('保存成功')
that.$emit("input", false);
that.$refs['ruleForm'].resetFields();
that.resetTableFields();
that.closeDialog();
//刷新列表
store.dispatch("user/refreshPage", true);
} else {
that.$message.error(res.message);
}
})
} else {
this.$message.error('请完善表单');
return false;
}
})
}
},
/**
* @description: 获取详情信息
* @author:
* @param ywh
*/
getSqr (ywh) {
getSqr(ywh ).then(res => {
if (res.code == 200) {
this.sqrList = res.result;
}
})
},
/**
* @description: 获取详情信息
* @author:
* @param ywh
*/
getBdcqk (ywh) {
getBdcqk(ywh ).then(res => {
if (res.code == 200) {
this.bdcqk = res.result;
}
})
},
/**
* @description: resetTableFields
* @author:
*/
resetTableFields () {
this.tableForm = [
{
name: '不动产权证书',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx: 1
},
{
name: '不动产权登记证明',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx: 2
}
]
},
/**
* @description: closeDialog
* @author:
*/
closeDialog () {
this.$popupCacel()
this.$refs['ruleForm'].resetFields();
this.resetTableFields();
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBoxheader.scss";
@import "~@/styles/slxx/slxx.scss";
.font-red {
color: red;
}
.middle-margin-bottom {
margin-top: 20px;
}
form /deep/ .el-form-item__label {
width: 150px !important;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
height: 32px;
float: none;
}
</style>