index.vue
14.3 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
504
505
506
507
508
509
510
511
<template>
<el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox editDialogBox mainCenter"
:visible.sync="dialogVisible" width="92%">
<div slot="title" class="dialog_title" ref="dialogTitle">
{{ title || '详情' }}
</div>
<div class="regularHeight">
<div class="editDialogBox-box">
<el-tabs v-model="titleName" type="card" @tab-click="handleTitleTab">
<el-tab-pane label="数据模型" name="sjmx"></el-tab-pane>
<el-tab-pane v-if="visiableXml" label="xml报文" name="xml"></el-tab-pane>
<el-tab-pane v-if="visiableXml" label="响应结果" name="xyjg"></el-tab-pane>
</el-tabs>
<div class="dialog-from item-content-input" v-if="titleName == 'sjmx'">
<el-row>
<el-col :span="5">
<span>业务报文ID:</span>
<el-select v-model="dataReport.BizMsgId" :disabled="$store.state.business.Edit">
<el-option v-for="item in bwoptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>ASID:</span>
<el-input v-model="dataReport.ASID" :disabled="$store.state.business.Edit" maxLength="5"></el-input>
</el-col>
<el-col :span="6">
<span>行政区划编码:</span>
<el-input v-model="dataReport.AreaCode" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>上次不动产单元号:</span>
<el-input v-model="dataReport.PreEstateNum" :disabled="$store.state.business.Edit"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<span>业务编码:</span>
<el-input v-model="dataReport.RecType" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="6">
<span>权利类型:</span>
<el-select v-model="dataReport.RightType" :disabled="$store.state.business.Edit">
<el-option v-for="item in dicData['A8']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>登记类型:</span>
<el-select v-model="dataReport.RegType" :disabled="$store.state.business.Edit">
<el-option v-for="item in dicData['A21']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-col>
<el-col :span="7">
<span>不动产权证书数量:</span>
<el-input v-model="dataReport.CertCount" :disabled="$store.state.business.Edit"
oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<span>创建时间:</span>
<el-date-picker v-model="dataReport.createDate" clearable disabled type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="6">
<span>业务流水号:</span>
<el-input v-model="dataReport.RecFlowID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="6">
<span>宗地/宗海代码:</span>
<el-input v-model="dataReport.ParcelID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>证明数量:</span>
<el-input v-model="dataReport.ProofCount" :disabled="$store.state.business.Edit"
oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<span>不动产单元号:</span>
<el-input v-model="dataReport.EstateNum" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>登记机构:</span>
<el-input v-model="dataReport.RegOrgID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="11">
<span>上次不动产权证号/不动产登记证明:</span>
<el-input v-model="dataReport.PreCertID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
</el-row>
</div>
</div>
<div class="editDialogBox-box editDialogBox-con" v-if="titleName == 'sjmx'">
<div class="sjmx">
<el-tabs v-model="activeName" ref="elTabs" type="card" @tab-click="changeList">
<el-tab-pane :name="item.soleurl" v-for="item in headerList" :key="item.soleurl">
<div slot="label" class="tab-pane-item">
<p class="name">{{ item.chinesetable }}</p>
<p class="soleurl" :data-name="item.soleurl">({{ item.datatable }})</p>
</div>
</el-tab-pane>
</el-tabs>
<div class="edit-content">
<component :is="editItem" ref="editItem" :class="{ 'editForm': $store.state.business.Edit }"
:bsmYwsjb="bsmYwsjb" :bsmSjsb="dataReport.bsmReport || dataReport.bsmSjsb" />
</div>
</div>
</div>
<div class="editDialogBox-box JsonEditor" v-if="titleName == 'xml'">
<JsonEditor :resultInfo="resultInfo" />
</div>
<div class="editDialogBox-box JsonEditor" v-if="titleName == 'xyjg'">
<Xyjg :form-data='dataReport'></Xyjg>
</div>
</div>
<div class="d-center" v-if="!$store.state.business.Edit && titleName == 'sjmx'">
<btn nativeType="cz" @click="dialogVisible = false">取 消</btn>
<btn nativeType="cx" @click="submitForm">保 存</btn>
</div>
<div class="d-center" v-if="!$store.state.business.Edit && titleName == 'xml'">
<btn nativeType="cx" @click="handleResubmit">重新上报</btn>
</div>
</el-dialog>
</template>
<script>
import axios from "axios";
import SERVER from '@/api/config'
const urlHeader = SERVER.SERVERAPI + '/rest/sjsb/DataReport/'
import { mapGetters } from "vuex";
import JsonEditor from "@/components/JsonEditor.vue";
import Xyjg from "./Result";
import { getTabsDetail, getXml, getReportDetail, restartGenerateXml, edit } from "@/api/dataReport.js";
export default {
components: { JsonEditor, Xyjg },
props: {
title: {
type: String,
default: ''
},
tabsActiveName: {
type: String,
default: ''
},
visiableXml: {
type: Boolean,
default: false
}
},
computed: {
...mapGetters(["dicData"]),
},
data () {
return {
key: 0,
resultInfo: '',
titleName: 'sjmx',
// 报文list
bwoptions: [],
dataReport: {},
index: 0,
bsmYwsjb: "",
ruleFormList: {
BizMsgId: "", // 业务报文ID
ASID: "", // ASID
AreaCode: "", //行政区划编码
PreEstateNum: "", //上次不动产单元号
RecType: "", // 业务编码
RightType: "", // 权利类型
RegType: "", //登记类型
CertCount: "", //不动产权证书数量
createDate: "", //创建时间
RecFlowID: "", // 业务流水号
ParcelID: "", //宗地/宗海代码
ProofCount: "", //证明数量
EstateNum: "", // 不动产单元号
RegOrgID: "", // 登记机构
PreCertID: "", //次不动产权证号/不动产登记证明
},
images: require("./images/success.gif"),
dialogVisible: false,
activeName: undefined,
editItem: "",
headerList: [],
dataTable: "",
};
},
methods: {
dicStatus (val, code) {
let data = this.dicData[code],
name = ''
if (data) {
data.map((item) => {
if (item.DCODE == val) {
name = item.DNAME
}
})
return name
}
},
handleTitleTab (val) {
},
isShow (item) {
this.$set(this.bwoptions, 0, {
value: item.bizMsgid,
label: item.bizMsgid,
})
this.$set(this.bwoptions, 1, {
value: item.bizMsgid + 'CBXZ',
label: item.bizMsgid + 'CBXZ',
})
this.$set(this.bwoptions, 2, {
value: item.bizMsgid + 'BBXZ',
label: item.bizMsgid + 'BBXZ',
})
this.titleName = 'sjmx';
this.dialogVisible = true;
//获取表头列表
this._getList(item)
//不动产数据查询上报详情
getReportDetail({ bsmReport: item.bsmSjsb || item.bsmReport }).then((res) => {
if (res.code == 200) {
this.dataReport = res.result;
}
})
// 获取xml
if (this.visiableXml) {
getXml(item.bizMsgid).then((res) => {
this.resultInfo = res.message
})
}
},
// 获取列表接口
_getList (data) {
getTabsDetail({ bsmReport: data.bsmReport || data.bsmSjsb }).then((res) => {
if (res.code == 200) {
this.headerList = res.result;
this.activeName = this.tabsActiveName == '' ? res.result[0].soleurl : this.tabsActiveName
this.bsmYwsjb = this.headerList[0].bsmYwsjb;
this.editItem = this.loadView(this.activeName);
}
});
},
changeList (val) {
let _index = val.index;
if (_index > this.index) {
}
this.index = _index;
this.bsmYwsjb = this.headerList[val.index].bsmYwsjb;
this.editItem = this.loadView(this.activeName);
// this.diaData.list.forEach((item) => {
// if (item.soleurl == this.activeName) {
// this.dataTable = item.dataTable;
// }
// });
},
loadView (view) {
return (r) =>
require.ensure([], () => r(require(`@/components/Business/${view}.vue`)));
},
closeDialog () {
this.dialogVisible = false;
//关闭弹框时将tabs项置空
this.editItem = "";
this.headerList = [];
},
/**
* @description: 提交
* @author: renchao
*/
submitForm: _.debounce(async function () {
let _this = this
// 上报请求头修改
try {
var headRes = await axios.post(urlHeader + 'edit', this.dataReport,
{
headers: {
'Authorization': sessionStorage.getItem("token") || ""
}
})
if (headRes.code == 200) {
_this._getList(_this.dataReport)
}
} catch (error) {
this.$message({
message: '报文头修改出错',
type: 'error'
})
}
let listRes = await this.$refs["editItem"].handleUpdateForm()
if (headRes.data?.code == 200 && listRes == 200) {
this.$message({
message: '修改成功',
type: 'success'
})
}
}, 500),
/**
* @description: 重新上报
* @author: renchao
*/
handleResubmit () {
let _this = this
this.$confirm('重新生成报文,是否上报省厅?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
createXml()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
function createXml () {
restartGenerateXml(_this.dataReport.bsmSjsb || _this.dataReport.bsmReport).then((res) => {
if (res.code == 200) {
_this.resultInfo = res.message
_this.$message({
message: '修改成功',
type: 'success'
})
}
})
}
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
/deep/.el-dialog__body {
display: flex;
flex-direction: column;
padding-bottom: 25px;
}
/deep/ .el-tabs {
color: #CEF8FF;
}
.sjmx {
/deep/.el-tabs__item {
height: 50px;
padding-top: 6px;
}
}
/deep/.el-tabs__item {
color: #CEF8FF !important;
display: flex;
flex-direction: row;
justify-content: center;
background: url("~@/image/tabitem.png") no-repeat;
background-size: 100% 100%;
border: none !important;
}
.obligee-item-name {
background: #05275B;
color: #FFFFFF;
background: url("~@/image/itembg.png") no-repeat;
background-size: 100% 100%;
}
/deep/.el-tabs__nav-scroll {
background: none;
}
/deep/.el-tabs__nav {
display: flex;
border: none !important;
}
/deep/.el-tabs__item.is-top {
border: 1px solid #dfe4ed;
border-top: 1px solid #dfe4ed;
border-bottom: 1px solid transparent;
}
/deep/.el-tabs__header {
border: none;
margin-bottom: 0;
}
/deep/.el-tabs__item.is-top:not(:last-child) {
margin-right: 5px;
}
/deep/.el-tabs__item.is-top {
background-color: none !important;
}
/deep/.el-tabs__item.is-active {
background: url("~@/image/tabitemse.png") no-repeat;
background-size: 100% 100%;
}
.success-images {
width: 30px;
height: 30px;
position: relative;
top: 10px;
right: 3px;
}
.tab-pane-item {
line-height: 20px;
color: #02D9FD;
p {
text-align: center;
}
}
.edit-content {
overflow-y: auto;
overflow-x: hidden;
padding-right: 1px;
margin-bottom: 10px;
border-top: none;
height: 44vh;
}
/deep/.editDialogBox {
border-radius: 8px;
overflow: hidden;
min-width: 1228px;
.el-dialog__header {
display: flex;
margin-bottom: 15px;
}
.dialog_footer {
flex-direction: column;
.dialog_button {
margin-top: 8px;
}
}
.divider {
width: 100%;
border-bottom: 1px solid #ccc;
}
}
.el-dialog__wrapper {
overflow: hidden;
}
.dialog-from {
padding-top: 0;
.el-col {
justify-content: space-between;
}
.bz {
height: 100%;
position: relative;
top: 3px;
}
/deep/.el-select {
padding-right: 15px;
}
/deep/.el-icon-circle-close {
display: none;
}
/deep/.el-input__suffix {
right: -25px !important;
top: -5px;
}
/deep/.el-select,
/deep/.el-input {
flex: 1;
width: 100%;
}
/deep/.el-textarea__inner {
border: none !important;
margin: 0;
}
&_header {
margin: 0 -5px !important;
}
&_title {
font-size: 18px;
color: #d7eaee;
margin: 3px 0;
}
}
</style>