editDialog.vue
6.98 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
<template>
<div>
<div class="qtjfjmb-edit-title">
<b>权利信息</b>
</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
<el-row>
<el-col :span="12">
<el-form-item label="权利类型编码" prop="qllx">
<el-input v-model="ruleForm.qllx" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="权利类型名称" prop="qllxmc">
<el-input v-model="ruleForm.qllxmc" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="不动产权类型" prop="bdcqzlx">
<el-select v-model="ruleForm.bdcqzlx" class="width100" disabled placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="打印模板" prop="dymbbs">
<el-select v-model="ruleForm.dymbbs" class="width100" placeholder="请选择">
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="权利其他状况模板" prop="qlqtzk">
<el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="ruleForm.qlqtzk">
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="qtjfjmb-edit-title">
<b>附记内容设置</b>
</div>
<ul>
<li v-for="(item, index) in titleList" @click="handleSelect(index)" :class="{ 'active': n == index }"
:key="index">{{ item.name }}</li>
</ul>
<el-row v-if="n == 0">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.firstreg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 1">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.transferreg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 2">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.changereg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 3">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.logoutreg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 4">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.rivisereg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 5">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.renewalreg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-else-if="n == 6">
<el-col :span="24">
<el-form-item label="附记模板">
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="ruleForm.replacereg">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item class="text-center">
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="submitForm" plain>确定</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { updateSysSqywmbsz, getSysSqywmbszDetailById } from '@/api/system'
export default {
props: {
formData: {
type: Object,
default: () => { }
}
},
mounted () {
if (this.formData.bsmMb) {
this.$startLoading()
getSysSqywmbszDetailById(this.formData.bsmMb).then(res => {
this.$endLoading()
let { result } = res
this.ruleForm = result ? result : {}
})
}
},
data () {
return {
n: 0,
ruleForm: {
qllx: '',
qllxmc: '',
bdcqzlx: '',
dymbbs: '',
qlqtzk: '',
firstreg: '',
},
options: [
{
value: '1',
label: '不动产权证书'
},
{
value: '2',
label: '不动产登记证明'
}
],
options1: [],
rules: {
qllx: [
{ required: true, message: '请输入权利类型编码', trigger: 'blur' }
],
qllxmc: [
{ required: true, message: '请输入权利类型名称', trigger: 'blur' }
],
bdcqzlx: [
{ required: true, message: '请选择不动产权类型', trigger: 'change' }
],
dymbbs: [
{ required: true, message: '请输入打印模板', trigger: 'blur' }
],
qlqtztmb: [
{ required: true, message: '请输入权利其他状况模板', trigger: 'blur' }
],
},
titleList: [
{
name: '首次登记'
},
{
name: '转移登记'
},
{
name: '变更登记'
},
{
name: '注销登记'
},
{
name: '更正登记'
},
{
name: '补证登记'
},
{
name: '换证登记'
}
]
}
},
methods: {
handleSelect (index) {
this.n = index
},
submitForm () {
let that = this
updateSysSqywmbsz(this.ruleForm).then(res => {
if (res.code === 200) {
this.$popupCacel()
that.$message({
message: '修改成功',
type: 'success'
})
}
})
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBoxheader.scss";
.qtjfjmb-edit-title {
padding-bottom: 10px;
border-bottom: 1px solid $borderColor;
margin-bottom: 10px;
}
ul {
@include flex;
border-radius: 5px;
overflow: hidden;
margin-bottom: 20px;
.active {
background: $light-blue;
color: #fff;
}
li {
flex: 1;
line-height: 36px;
@include flex-center;
border: 1px solid $borderColor;
margin-left: -1px;
cursor: pointer;
transition: all 0.3s;
&:hover {
@extend .active;
}
}
}
</style>