添加抵押权批量操作
Showing
2 changed files
with
522 additions
and
0 deletions
... | @@ -65,3 +65,20 @@ export function saveData (data, djlx) { | ... | @@ -65,3 +65,20 @@ export function saveData (data, djlx) { |
65 | data | 65 | data |
66 | }) | 66 | }) |
67 | } | 67 | } |
68 | |||
69 | /** | ||
70 | * @description: 批量保存 | ||
71 | * @param {*} data | ||
72 | * @author: renchao | ||
73 | */ | ||
74 | export function saveBatchData (data, djlx) { | ||
75 | let apiUrl = "/rest/ywbl/dyaq/saveBatchData"; | ||
76 | if (djlx == "400") { | ||
77 | apiUrl = "/rest/ywbl/dyaq/saveLogoutBatchData"; | ||
78 | } | ||
79 | return request({ | ||
80 | url: SERVER.SERVERAPI + apiUrl, | ||
81 | method: 'post', | ||
82 | data | ||
83 | }) | ||
84 | } | ... | ... |
src/views/ywbl/slsqxx/diyaq/batchSlxx.vue
0 → 100644
1 | <template> | ||
2 | <!-- 受理信息 --> | ||
3 | <div class="slxx"> | ||
4 | <el-form | ||
5 | :model="ruleForm" | ||
6 | v-Loading="loading" | ||
7 | :label-position="flag ? 'top' : ''" | ||
8 | :inline="flag" | ||
9 | ref="ruleForm" | ||
10 | label-width="140px"> | ||
11 | <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''"> | ||
12 | <div class="slxx_title title-block"> | ||
13 | 申请业务信息 | ||
14 | <div class="triangle"></div> | ||
15 | </div> | ||
16 | <el-row :gutter="10" v-if="ruleForm.flow"> | ||
17 | <el-col :span="8"> | ||
18 | <el-form-item label="业务号:"> | ||
19 | <el-input disabled v-model="ruleForm.flow.ywh"></el-input> | ||
20 | </el-form-item> | ||
21 | </el-col> | ||
22 | <el-col :span="8"> | ||
23 | <el-form-item label="受理人员:"> | ||
24 | <el-input disabled v-model="ruleForm.slsq.slry"></el-input> | ||
25 | </el-form-item> | ||
26 | </el-col> | ||
27 | <el-col :span="8"> | ||
28 | <el-form-item label="受理时间:"> | ||
29 | <el-input disabled v-model="ruleForm.slsq.slsj"></el-input> | ||
30 | </el-form-item> | ||
31 | </el-col> | ||
32 | </el-row> | ||
33 | <el-row :gutter="10" v-if="ruleForm.sldyList"> | ||
34 | <el-col :span="8"> | ||
35 | <el-form-item label="权利类型:"> | ||
36 | <el-input | ||
37 | disabled | ||
38 | v-model="ruleForm.sldyList[0].qllxmc"></el-input> | ||
39 | </el-form-item> | ||
40 | </el-col> | ||
41 | <el-col :span="8"> | ||
42 | <el-form-item label="登记类型:"> | ||
43 | <el-input | ||
44 | disabled | ||
45 | v-model="ruleForm.sldyList[0].djlxmc"></el-input> | ||
46 | </el-form-item> | ||
47 | </el-col> | ||
48 | <el-col :span="8"> | ||
49 | <el-form-item label="登记情形:"> | ||
50 | <el-input disabled v-model="ruleForm.slsq.djqxmc"></el-input> | ||
51 | </el-form-item> | ||
52 | </el-col> | ||
53 | </el-row> | ||
54 | |||
55 | <div | ||
56 | class="slxx_title title-block" | ||
57 | v-if="ruleForm.slsq.djywbm.includes('400')"> | ||
58 | 在抵押权信息列表({{ ruleForm.qlxxList.length }} 个) | ||
59 | <div class="triangle"></div> | ||
60 | </div> | ||
61 | <div | ||
62 | class="slxx_title title-block" | ||
63 | v-else> | ||
64 | 抵押不动产列表信息({{ ruleForm.ztQlxxList.length }} 个) | ||
65 | <div class="triangle"></div> | ||
66 | </div> | ||
67 | <cfBdcdyTable :tableData="ruleForm.qlxxList" v-if="ruleForm.slsq.djywbm.includes('400')" /> | ||
68 | <qjhTable v-else :tableData="ruleForm.hlist" /> | ||
69 | <div class="slxx_title title-block"> | ||
70 | 抵押信息 | ||
71 | <div class="triangle"></div> | ||
72 | </div> | ||
73 | <el-row | ||
74 | :gutter="10" | ||
75 | v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
76 | <el-col :span="8"> | ||
77 | <el-form-item label="抵押方式:"> | ||
78 | <el-radio-group disabled v-model="ruleForm.diyaqList[0].dyfs"> | ||
79 | <el-radio label="1">一般抵押</el-radio> | ||
80 | <el-radio label="2">最高额抵押</el-radio> | ||
81 | </el-radio-group> | ||
82 | </el-form-item> | ||
83 | </el-col> | ||
84 | <el-col :span="8"> | ||
85 | <el-form-item label="抵押金额类型:"> | ||
86 | <el-radio-group | ||
87 | v-model="ruleForm.diyaqList[0].dyjelx" | ||
88 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"> | ||
89 | <el-radio label="0">独立抵押</el-radio> | ||
90 | <el-radio label="1">整体抵押</el-radio> | ||
91 | </el-radio-group> | ||
92 | </el-form-item> | ||
93 | </el-col> | ||
94 | <el-col :span="8"> | ||
95 | <el-form-item | ||
96 | label="是否存在禁止或者限制转让抵押不动产的约定:" | ||
97 | label-width="300px"> | ||
98 | <el-radio-group | ||
99 | v-model="ruleForm.diyaqList[0].sfczjzhxz" | ||
100 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"> | ||
101 | <el-radio label="1">启用</el-radio> | ||
102 | <el-radio label="0">禁用</el-radio> | ||
103 | </el-radio-group> | ||
104 | </el-form-item> | ||
105 | </el-col> | ||
106 | </el-row> | ||
107 | <el-row | ||
108 | :gutter="10" | ||
109 | v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
110 | <el-col :span="8" v-show="ruleForm.diyaqList[0].dyfs == 1"> | ||
111 | <el-form-item label="被担保主债权数额:"> | ||
112 | <div style="display: flex"> | ||
113 | <el-input | ||
114 | v-model="ruleForm.diyaqList[0].bdbzzqse" | ||
115 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input> | ||
116 | <el-select | ||
117 | style="width: 68px" | ||
118 | v-model="ruleForm.diyaqList[0].jedw" | ||
119 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"> | ||
120 | <el-option | ||
121 | v-for="item in dictData['A57']" | ||
122 | :key="item.dcode" | ||
123 | :label="item.dname" | ||
124 | :value="item.dcode"> | ||
125 | </el-option> | ||
126 | </el-select> | ||
127 | </div> | ||
128 | </el-form-item> | ||
129 | </el-col> | ||
130 | |||
131 | <el-col :span="8" v-show="ruleForm.diyaqList[0].dyfs == 2"> | ||
132 | <el-form-item label="最高债权额:"> | ||
133 | <el-input | ||
134 | v-model="ruleForm.diyaqList[0].zgzqse" | ||
135 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input> | ||
136 | <el-select | ||
137 | v-model="ruleForm.diyaqList[0].jedw" | ||
138 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"> | ||
139 | <el-option | ||
140 | v-for="item in dictData['A57']" | ||
141 | :key="item.dcode" | ||
142 | :label="item.dname" | ||
143 | :value="item.dcode"> | ||
144 | </el-option> | ||
145 | </el-select> | ||
146 | </el-form-item> | ||
147 | </el-col> | ||
148 | |||
149 | <el-col :span="8"> | ||
150 | <el-form-item label="债务履行起始时间:"> | ||
151 | <el-date-picker | ||
152 | v-model="ruleForm.diyaqList[0].zwlxqssj" | ||
153 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')" | ||
154 | type="date"> | ||
155 | </el-date-picker> | ||
156 | </el-form-item> | ||
157 | </el-col> | ||
158 | <el-col :span="8"> | ||
159 | <el-form-item label="债务履行结束时间:"> | ||
160 | <el-date-picker | ||
161 | v-model="ruleForm.diyaqList[0].zwlxjssj" | ||
162 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')" | ||
163 | type="date"> | ||
164 | </el-date-picker> | ||
165 | </el-form-item> | ||
166 | </el-col> | ||
167 | </el-row> | ||
168 | |||
169 | <el-row v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
170 | <el-col :span="24"> | ||
171 | <el-form-item label="担保范围:"> | ||
172 | <el-input | ||
173 | v-model="ruleForm.diyaqList[0].dbfw" | ||
174 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input> | ||
175 | </el-form-item> | ||
176 | </el-col> | ||
177 | </el-row> | ||
178 | <el-row v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
179 | <el-col :span="24"> | ||
180 | <el-form-item label="最高债权确定事实和数额:"> | ||
181 | <el-input | ||
182 | v-model="ruleForm.diyaqList[0].zgzqqdss" | ||
183 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input> | ||
184 | </el-form-item> | ||
185 | </el-col> | ||
186 | </el-row> | ||
187 | <el-row v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
188 | <el-col> | ||
189 | <el-form-item label="附记:" prop="fj"> | ||
190 | <el-input | ||
191 | type="textarea" | ||
192 | maxlength="500" | ||
193 | show-word-limit | ||
194 | v-model="ruleForm.diyaqList[0].fj" | ||
195 | :disabled="!viewEdit || ruleForm.slsq.djywbm.includes('400')"></el-input> | ||
196 | </el-form-item> | ||
197 | </el-col> | ||
198 | </el-row> | ||
199 | |||
200 | <div class="slxx_title title-block"> | ||
201 | 抵押权人信息 | ||
202 | <div class="triangle"></div> | ||
203 | </div> | ||
204 | <el-row | ||
205 | :gutter="10" | ||
206 | v-if="ruleForm.sldyList && ruleForm.sldyList.length > 0"> | ||
207 | <el-col :span="14"> | ||
208 | <el-form-item label="共有方式:"> | ||
209 | <el-radio-group | ||
210 | :disabled="!viewEdit" | ||
211 | v-model="ruleForm.sldyList[0].gyfs"> | ||
212 | <el-radio label="0">单独所有</el-radio> | ||
213 | <el-radio label="1">共同共有</el-radio> | ||
214 | <el-radio label="2">按份所有</el-radio> | ||
215 | <el-radio label="3">其它共有</el-radio> | ||
216 | </el-radio-group> | ||
217 | </el-form-item> | ||
218 | </el-col> | ||
219 | <el-col :span="5" v-show="ruleForm.sldyList[0].gyfs != '0'"> | ||
220 | <el-form-item label="是否分别持证:"> | ||
221 | <el-radio-group | ||
222 | v-model="ruleForm.sldyList[0].sqfbcz" | ||
223 | :disabled="!viewEdit" | ||
224 | @input="updaterow()"> | ||
225 | <el-radio :label="1">是</el-radio> | ||
226 | <el-radio :label="0">否</el-radio> | ||
227 | </el-radio-group> | ||
228 | </el-form-item> | ||
229 | </el-col> | ||
230 | <el-col | ||
231 | :span="5" | ||
232 | v-show=" | ||
233 | ruleForm.sldyList[0].gyfs != '0' && | ||
234 | ruleForm.sldyList[0].sqfbcz == '0' | ||
235 | "> | ||
236 | <el-form-item label="持证人:"> | ||
237 | <el-select | ||
238 | v-model="czr" | ||
239 | placeholder="持证人" | ||
240 | :disabled="!viewEdit"> | ||
241 | <el-option | ||
242 | v-for="(item,index) in czrOptions" | ||
243 | :key="index" | ||
244 | :label="item.sqrmc" | ||
245 | :value="item.id"> | ||
246 | </el-option> | ||
247 | </el-select> | ||
248 | </el-form-item> | ||
249 | </el-col> | ||
250 | </el-row> | ||
251 | <qlrCommonTable | ||
252 | v-if="ruleForm.sldyList && ruleForm.sldyList.length > 0" | ||
253 | :tableData="ruleForm.qlrList" | ||
254 | @upDateQlrxxList="upDateQlrxxList" | ||
255 | :disabled="viewEdit" | ||
256 | :gyfs="ruleForm.sldyList[0].gyfs" /> | ||
257 | <div class="slxx_title title-block"> | ||
258 | 抵押人信息 | ||
259 | <div class="triangle"></div> | ||
260 | </div> | ||
261 | <qlrCommonTable | ||
262 | :tableData="ruleForm.ywrList" | ||
263 | @upDateQlrxxList="upDateYwrxxList" | ||
264 | :disabled="viewEdit" /> | ||
265 | |||
266 | <div class="slxx_title title-block"> | ||
267 | 登记原因 | ||
268 | <div class="triangle"></div> | ||
269 | </div> | ||
270 | <el-row | ||
271 | :gutter="10" | ||
272 | v-if="ruleForm.diyaqList && ruleForm.diyaqList.length > 0"> | ||
273 | <el-col> | ||
274 | <el-form-item | ||
275 | v-if="ruleForm.sldyList[0].djlx == '400'" | ||
276 | label="注销抵押原因:" | ||
277 | prop="djyy"> | ||
278 | <el-input | ||
279 | class="textArea" | ||
280 | type="textarea" | ||
281 | :disabled="!viewEdit" | ||
282 | v-model="ruleForm.diyaqList[0].zxdyyy"> | ||
283 | </el-input> | ||
284 | </el-form-item> | ||
285 | <el-form-item v-else label="登记原因:" prop="diyaqList[0].djyy"> | ||
286 | <el-input | ||
287 | class="textArea" | ||
288 | type="textarea" | ||
289 | maxlength="500" | ||
290 | show-word-limit | ||
291 | :disabled="!viewEdit" | ||
292 | v-model="ruleForm.diyaqList[0].djyy"> | ||
293 | </el-input> | ||
294 | </el-form-item> | ||
295 | </el-col> | ||
296 | </el-row> | ||
297 | </div> | ||
298 | <el-row class="btn" v-if="isSave"> | ||
299 | <el-form-item> | ||
300 | <el-button type="primary" @click="onSubmitClick()">保存</el-button> | ||
301 | </el-form-item> | ||
302 | </el-row> | ||
303 | </el-form> | ||
304 | </div> | ||
305 | </template> | ||
306 | <script> | ||
307 | import qjhTable from "@/views/workflow/components/qjhTable"; | ||
308 | import cfBdcdyTable from "@/views/workflow/components/cfBdcdyTable"; | ||
309 | import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"; | ||
310 | import { bacthInit, saveBatchData } from "@/api/workflow/diyaqFlow.js"; | ||
311 | import { mapGetters } from "vuex"; | ||
312 | export default { | ||
313 | mounted () { | ||
314 | let that = this | ||
315 | this.viewEdit = this.$parent.currentSelectTab.ableOperation; | ||
316 | this.propsParam = this.$attrs; | ||
317 | var formdata = new FormData(); | ||
318 | |||
319 | this.loading = true | ||
320 | formdata.append("bsmSlsq", this.$route.query.bsmSlsq); | ||
321 | formdata.append("djlx", this.propsParam.djlx); | ||
322 | formdata.append("isEdit", this.viewEdit); | ||
323 | bacthInit(formdata).then((res) => { | ||
324 | setTimeout(() => { | ||
325 | that.loading = false | ||
326 | }, 200) | ||
327 | if (res.code === 200 && res.result) { | ||
328 | this.ruleForm = res.result; | ||
329 | this.ruleForm.qlrList.forEach((item) => { | ||
330 | item.id = item.bsmSqr | ||
331 | if (item.sfczr == '1') { | ||
332 | that.czr = item.bsmSqr | ||
333 | } | ||
334 | }) | ||
335 | that.czrOptions = that.ruleForm.qlrList; | ||
336 | that.isSave = that.viewEdit | ||
337 | } else { | ||
338 | that.isSave = false | ||
339 | that.$confirm(res.message, '提示', { | ||
340 | cancelButtonText: '取消', | ||
341 | showConfirmButton: false, | ||
342 | type: 'warning' | ||
343 | }) | ||
344 | } | ||
345 | }).catch(() => { | ||
346 | this.loading = false | ||
347 | }) | ||
348 | }, | ||
349 | components: { qlrCommonTable, qjhTable, cfBdcdyTable }, | ||
350 | computed: { | ||
351 | ...mapGetters(["dictData", "flag"]), | ||
352 | }, | ||
353 | data () { | ||
354 | return { | ||
355 | isSave: true, | ||
356 | loading: false, | ||
357 | //表单是否可操作 | ||
358 | viewEdit: true, | ||
359 | disabled: true, | ||
360 | czrOptions: [], | ||
361 | czr: "", | ||
362 | ruleForm: {}, | ||
363 | //传递参数 | ||
364 | propsParam: {}, | ||
365 | rules: { | ||
366 | 'diyaqList[0].djyy': [ | ||
367 | { required: true, message: '请输入登记原因', trigger: 'blur' } | ||
368 | ] | ||
369 | }, | ||
370 | tableData: [], | ||
371 | }; | ||
372 | }, | ||
373 | methods: { | ||
374 | /** | ||
375 | * @description: onSubmitClick | ||
376 | * @author: renchao | ||
377 | */ | ||
378 | onSubmitClick () { | ||
379 | let that = this; | ||
380 | if (this.ruleForm.qlrList.length == 0) { | ||
381 | this.$message({ | ||
382 | showClose: true, | ||
383 | message: "请确认抵押权人信息", | ||
384 | type: "error", | ||
385 | }); | ||
386 | return false; | ||
387 | } | ||
388 | if (this.ruleForm.sldyList[0].gyfs == "0") { | ||
389 | if (this.ruleForm.qlrList.length > 1) { | ||
390 | this.$message({ | ||
391 | showClose: true, | ||
392 | message: "共有方式:单独所有,抵押权人只能是一个人", | ||
393 | type: "error", | ||
394 | }); | ||
395 | return false; | ||
396 | } | ||
397 | this.ruleForm.qlrList[0].sfczr = "1"; | ||
398 | } else { | ||
399 | if (this.ruleForm.qlrList.length <= 1) { | ||
400 | this.$message({ | ||
401 | showClose: true, | ||
402 | message: | ||
403 | "共有方式:共同所有,按份所有,其他所有,抵押权人必须是两个以上", | ||
404 | type: "error", | ||
405 | }); | ||
406 | return false; | ||
407 | } | ||
408 | //是否分别持证 | ||
409 | if (this.ruleForm.sldyList[0].sqfbcz == "1") { | ||
410 | //是 | ||
411 | this.ruleForm.qlrList.forEach((item, index) => { | ||
412 | item.sfczr = "1" | ||
413 | }) | ||
414 | } else { | ||
415 | if (that.czr === '') { | ||
416 | that.$message({ | ||
417 | showClose: true, | ||
418 | message: "请选择持证人", | ||
419 | type: "error", | ||
420 | }); | ||
421 | return false; | ||
422 | } | ||
423 | this.ruleForm.qlrList.forEach((item, index) => { | ||
424 | if (item.id == that.czr) { | ||
425 | item.sfczr = "1"; | ||
426 | } else { | ||
427 | item.sfczr = "0"; | ||
428 | } | ||
429 | }); | ||
430 | } | ||
431 | } | ||
432 | this.$refs['ruleForm'].validate((valid) => { | ||
433 | if (valid) { | ||
434 | that.$store.dispatch("user/refreshPage", false); | ||
435 | saveBatchData(that.ruleForm, that.propsParam.djlx).then((res) => { | ||
436 | if (res.code === 200) { | ||
437 | that.$message({ | ||
438 | showClose: true, | ||
439 | message: "保存成功!", | ||
440 | type: "success", | ||
441 | }); | ||
442 | that.$store.dispatch("user/refreshPage", true); | ||
443 | } else { | ||
444 | that.$message({ | ||
445 | showClose: true, | ||
446 | message: res.message, | ||
447 | type: "error", | ||
448 | }); | ||
449 | } | ||
450 | }) | ||
451 | } else { | ||
452 | that.$message({ | ||
453 | showClose: true, | ||
454 | message: "请输入登记原因", | ||
455 | type: "error" | ||
456 | }) | ||
457 | return false | ||
458 | } | ||
459 | }) | ||
460 | }, | ||
461 | /** | ||
462 | * @description: 是否持证人变化 | ||
463 | * @param {*} val | ||
464 | * @author: renchao | ||
465 | */ | ||
466 | updaterow () { | ||
467 | this.czr = ""; | ||
468 | }, | ||
469 | /** | ||
470 | * @description: 更新抵押权人信息 | ||
471 | * @param {*} val | ||
472 | * @author: renchao | ||
473 | */ | ||
474 | upDateQlrxxList (val) { | ||
475 | if (!_.isEqual(val, this.ruleForm.qlrList)) { | ||
476 | this.ruleForm.qlrList = _.cloneDeep(val); | ||
477 | this.czrOptions = this.ruleForm.qlrList; | ||
478 | } | ||
479 | this.num = 0 | ||
480 | this.ruleForm.qlrList.forEach(item => { | ||
481 | if (item.id == this.czr) { | ||
482 | this.num++ | ||
483 | } | ||
484 | }) | ||
485 | if (this.num == 0) { | ||
486 | this.czr = '' | ||
487 | } | ||
488 | }, | ||
489 | /** | ||
490 | * @description: 更新义务人信息 | ||
491 | * @param {*} val | ||
492 | * @author: renchao | ||
493 | */ | ||
494 | upDateYwrxxList (val) { | ||
495 | if (!_.isEqual(val, this.ruleForm.ywrList)) { | ||
496 | this.ruleForm.ywrList = _.cloneDeep(val); | ||
497 | } | ||
498 | } | ||
499 | } | ||
500 | } | ||
501 | </script> | ||
502 | <style scoped lang="scss"> | ||
503 | @import "~@/styles/public.scss"; | ||
504 | @import "~@/styles/slxx/slxx.scss"; | ||
505 | </style> |
-
Please register or sign in to post a comment