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
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<template>
<div class="eibs-tab">
<c-list-search @form-reset="handleReset" @form-search="formSubmit">
<!-- 持续展示区 -->
<template v-slot="searchSlot">
<el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small" :model="model">
<el-row>
<c-col :span="8">
<el-form-item label="通知编号" style="width: 100%">
<c-input v-model="model.seaownref" maxlength="16" placeholder="请输入通知编号"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="通知日" style="width: 100%">
<c-col :span="11">
<c-date-picker type="date" v-model="model.opndatfrom" style="width: 100%" placeholder="请选择起始日期" value-format="yyyy-MM-dd"></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker type="date" v-model="model.opndatto" style="width: 100%" placeholder="请选择截止日期" value-format="yyyy-MM-dd"></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="通知类别" style="width: 100%">
<c-select collapse-tags multiple v-model="model.gidopentyps" style="width: 100%" :filterKey="['GJBH','GNBH']" placeholder="请选择通知类别" :clearable="true" dbCode="trntyp">
</c-select>
</el-form-item>
</c-col>
</el-row>
<!-- 可控展示区 -->
<el-row v-show="searchSlot.searchToggle">
<c-col :span="8">
<el-form-item label="客户号" style="width: 100%">
<c-input v-model="model.ptyExtkey" maxlength="16" placeholder="请输入客户号"
:disabled="seaptyNotEmpty" @change="ptyExtkeyChange"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="当事人参考号" style="width: 100%">
<c-input v-model="model.searef" maxlength="16" placeholder="请输入当事人参考号"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="当事人BIC/名称" style="width: 100%">
<c-input v-model="model.seapty" maxlength="24" placeholder="请输入当事人BIC/名称"
:disabled="ptyExtkeyNotEmpty" @change="seaptyChange"></c-input>
</el-form-item>
</c-col>
<!-- <c-col :span="24"> -->
<c-col :span="8">
<el-form-item label="保函品种" style="width: 100%">
<c-select v-model="model.seagtyp" style="width: 100%" clearable placeholder="请选择保函品种" sort="SRT" dbCode="TYPGAR" uil="CN" :filterKey="['1','2','3','4','5','6','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','O','P','Q','R','S','T','U','V','W','X','Y','Z']">
</c-select>
</el-form-item>
</c-col>
<!-- <c-col :span="8">
<el-form-item label="通知方式" style="width: 100%">
<c-select v-model="model.seapurpos" style="width: 100%" :filterKey="['ADVI','ACNF']" clearable placeholder="请选择通知方式" uil="CN" dbCode="purpos">
</c-select>
</el-form-item>
</c-col> -->
<c-col :span="8">
<el-form-item label="分离式保函" style="width: 100%">
<c-select v-model="model.fenlishi" style="width: 100%" clearable placeholder="请选择是否分离式保函">
<el-option v-for="item in fenlsh" :key="item.value" :value ="item.value" :label="item.label">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="到期日" style="width: 100%">
<c-col :span="24">
<c-date-picker type="date" v-model="model.expdat" style="width: 100%" placeholder="请选择到期日" value-format="yyyy-MM-dd"></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="金额" style="width: 100%">
<c-col :span="8">
<c-select v-model="model.seacur" style="width: 100%" clearable placeholder="请选择币种" dbCode="curtxt">
</c-select>
</c-col>
<c-col :span="1" style="text-align: center">
<label style="display: inline-block; width: 100%"></label>
</c-col>
<c-col :span="15">
<c-input-currency v-model="model.seaamt" style="width: 100%" :maxlength="18" placeholder="请输入金额" :currency="model.seacur"></c-input-currency>
</c-col>
</el-form-item>
</c-col>
<!-- <c-col :span="8">
<el-form-item label="角色" style="width: 100%">
<c-select v-model="model.searol" style="width: 100%" placeholder="请选择角色" clearable dbCode="rolall">
</c-select>
</el-form-item>
</c-col> -->
<!-- <c-col :span="8">
<el-form-item label="业务简略信息" style="width: 100%">
<c-input v-model="model.nam" maxlength="40" placeholder="请输入业务简略信息"></c-input>
</el-form-item>
</c-col> -->
<c-col :span="8">
<el-form-item label="业务状态" style="width: 100%">
<c-select v-model="model.seasta" style="width: 100%" clearable placeholder="请选择状态" >
<el-option v-for="item in seastas" :key="item.value" :value ="item.value" :label="item.label">
</el-option>
</c-select>
</el-form-item>
</c-col>
<!-- <c-col :span="8">
<el-form-item label="处理类型" style="width: 100%">
<c-select v-model="model.hndtyp" style="width: 100%" :filterKey="['FA','FI','FR']" clearable placeholder="请选择处理类型" dbCode="hndtyp" >
</c-select>
</el-form-item>
</c-col> -->
<c-col :span="8">
<el-form-item label="电子渠道类型" style="width: 100%">
<c-select v-model="model.fromflg" style="width: 100%" :filterKey="['E','Y']" clearable placeholder="请选择电子渠道类型" dbCode="frmflg">
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="非居民客户类型" style="width: 100%">
<c-select v-model="model.ptytyp" style="width: 100%" placeholder="请选择非居民客户" >
<el-option v-for="item in ptytyps" :key="item.value" :value ="item.value" :label="item.label">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="被保证人名称" style="width: 100%">
<c-input v-model="model.grtnam" maxlength="80" placeholder="请输入被保证人名称"></c-input>
</el-form-item>
</c-col>
<!-- <c-col :span="8">
<el-form-item label="是否已授权" style="width: 100%">
<c-select v-model="model.isauthorize" style="width: 100%" clearable placeholder="请选择是否已授权" dbCode='cxmflg'>
</c-select>
</el-form-item>
</c-col> -->
<c-col :span="24">
<c-col :span="4">
<el-form-item style="text-align: right;" class="checkbox-left">
<c-checkbox v-model="model.cmtflg" true-label='X' false-label=''>跨境人民币保函</c-checkbox>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item style="text-align: right;margin-right: 5px;" class="checkbox-left">
<c-checkbox v-model="model.fingua" true-label='Y' false-label='' >对外担保</c-checkbox>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item style="text-align: right;margin-right: 5px;" class="checkbox-left">
<c-checkbox v-model="model.isClaim" true-label='X' false-label=''>发生过索偿</c-checkbox>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item style="text-align: right;margin-right: 5px;" class="checkbox-left">
<c-checkbox v-model="model.isfenlishi" true-label='X' false-label=''>分离式</c-checkbox>
</el-form-item>
</c-col>
<c-col :span="4">
<el-form-item style="text-align: right;margin-right: 5px;" class="checkbox-left">
<c-checkbox v-model="model.finfingua" true-label='Y' false-label=''>融资性保函</c-checkbox>
</el-form-item>
</c-col>
</c-col>
</el-row>
</el-form>
</template>
</c-list-search>
<el-row style="margin-bottom: 10px;">
<el-col :span="24" style="margin-top: 10px;margin-bottom: 10px;">
<c-button class="medium_bcs" style="margin-left: 20" size="medium" type="success" @click="exportExcel">导出Excel</c-button>
</el-col>
</el-row>
<el-col :span="24" style="margin-top: 10px">
<div style="height: 90%">
<c-col :span="24">
<el-table
id='infgidBSTableRef'
ref='infgidBSTableRef'
v-loading="load"
:data="tableData"
style="width:100%"
height="calc(100vh - 400px)"
size="small"
:border="true"
:highlight-current-row="true"
@sort-change="sortChange"
>
<el-table-column v-for="(item,key) in columns" :key="key" :label="item.label" :prop="item.prop" sortable="custom" :fixed="item.fixed" :show-overflow-tooltip="true" :min-width="item.width">
<template slot-scope="scope">
<div v-if="item.prop ==='gidfromflg'">{{getCodelabel(scope.row[item.prop],'gidfromflg')}}</div>
<div v-else-if="item.prop ==='gidgartyp'">{{getCodelabel(scope.row[item.prop],'gidgartyp')}}</div>
<div v-else-if="item.prop ==='gidhndtyp'">{{getCodelabel(scope.row[item.prop],'gidhndtyp')}}</div>
<div style="text-align: right" v-else-if="item.prop.indexOf('amt') > 0">{{moneyFormat(scope.row[item.prop])}}</div>
<div v-else>{{scope.row[item.prop]}}</div>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="150px">
<template slot="header">
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
<c-button icon="el-icon-s-tools" @click="columnSetting(tableColumns)"></c-button>
</template>
<template slot-scope="scope">
<c-button style="margin-left: 0" type='primary' size="small" @click="toDetail(scope.row)" slot="reference">详情
</c-button>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" :page-size="pagination.pageSize" :current-page="pagination.pageNum"
@size-change="handleSizeChange" @current-change="currentChange">
</el-pagination>
</c-col>
</div>
</el-col>
<!-- 自定义列属性弹框 -->
<el-dialog v-dialogDrag class="showColumnDialog" v-if="showDig" :visible.sync="showDig" :title="'自定义列属性'" appenD-to-body style="padding:20px">
<el-form-item label-width="0" style="display: flex;align-items: center">
<el-checkbox-group v-model="columnGroup" @change="handleColumnChange">
<el-checkbox
class="selectColumnClass checkbox-left"
style="margin-right:55px;width:150px"
v-for="item in digColumns" :key="item.prop"
:label="item.label">
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<span slot="footer" style="text-align:center">
<el-checkbox
class="selectAllClass checkbox-left"
:indeterminate="
columnGroup.length > 0 &&
columnGroup.length < digColumns.length
"
v-model="selectAll"
@change="setAll">全选</el-checkbox>
<el-button type="primary" @click="saveColumnEvent()" style="margin-left:10px;">保存</el-button>
</span>
</el-dialog>
<!-- 处理弹框 -->
<el-dialog v-dialogDrag v-if="handleVisible" :visible.sync="handleVisible" title="交易列表" style="padding:24px">
<el-button v-for="item in buttonsList" :key="item.value" type="primary" style="margin:3px" @click="buttonClick(item.value)">{{item.label}}</el-button>
</el-dialog>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable";
import event from "../event";
import Default from "../model/default";
export default {
inject: ["root"],
props: ["model", "codes"],
mixins:[event,Default],
components: {},
data() {
return {
seaptyNotEmpty: false,
ptyExtkeyNotEmpty: false,
isOnShow:false,
activeTab: "bs", // tabs当前展示的tab
ownref: "",
isGuarantee: "",
selectAll: [], // 是否全选
digColumns: [], // 弹框的所有列
columnGroup: [], // 弹框选中的列
showDig: false, // 弹框的展示/隐藏
ptytyps:[
{value:'NRA',label:'NRA'},
{value:'FTN',label:'FTN'},
],
seastas:[
{value:'C',label:'已结清'},
{value:'O',label:'未结清'},
],
fenlsh:[
// {value:'0',label:'非分离式'},
{value:'1',label:'融资类'},
{value:'2',label:'非融资类'},
],
tableColumns: [
{
prop: "gidownref",
label: "业务参考号",
width: 150,
isShow: true
},
{prop:"gidhndtyp",
label: "处理类型",
isShow: true,
width: 150
},
{prop:"gidgartyp",
label: "保函品种",
isShow: true,
width: 150
},
{
prop: "maxcur",
label: "币种",
width: 80,
isShow: true
},
{
prop: "maxamt",
label: "金额",
width: 150,
isShow: true
},
{prop: "maxxrfamt",
label: "等额人民币 ",
width: 150,
isShow: true
},
{
prop: "opnamt",
label: "余额",
width: 150,
isShow: true
},
{prop: "opnxrfamt",
label: "等额人民币",
width: 150,
isShow: true
},
{
prop: "orddat",
label: "通知日",
isShow: true,
width: 100
},
{
prop: "gidexpdat",
label: "效期",
isShow: true,
width: 100
},
{
prop: "clsdat",
label: "结清日期",
isShow: true,
width: 110
},
{
prop: "ptsbenextkey",
label: "客户编号",
width: 150,
isShow: true
},
{
prop: "ptsbennam",
label: "受益人名称",
width: 200,
isShow: true
},
{
prop: "ptsaplextkey",
label: "申请人编号",
width: 150,
isShow: false
},
{
prop: "ptsaplnam",
label: "申请人名称",
width: 200,
isShow: true
},
{
prop: "issExtkey",
label: "开证行",
width: 150,
isShow: true
},
{
prop: "gidfromflg",
label: "渠道类型",
isShow: true,
width: 130
},
{
prop: "gidothersno",
label: "第三方系统编号",
isShow: true,
width: 180
},
{prop: "gidiscrotra",
label: "基础贸易是/否跨境货物贸易",
isShow: true,
width: 251
},
{prop:"gidgrtnam",
label: "被担保人名称",
isShow: true,
width: 150
},
{
prop: "bchname",
label: "分行名称",
width: 150,
isShow: true
},
{
prop: "gidownusr",
label: "经办",
width: 150,
isShow: true
},
],
load: false,
tableData: [],
pagination: {
pageNum: 1,
pageSize: 10,
total: 0
},
handleVisible: false,
handleModel: {},
buttonsList: []
};
},
mounted() {
this.formSubmit();
this.getdbCode('frmflg','CN','gidfromflg');
this.getdbCode('typgar','CN','gidgartyp');
this.getdbCode('hndtyp','CN','gidhndtyp');
},
computed: {
columns() {
return this.tableColumns.filter(item => item.isShow);
},
},
methods: {
formSubmit() {
this.model.column = ''
this.model.order = ''
this.handleSearch();
},
async currentChange(num) {
this.pagination.pageNum = num;
this.handleSearch();
},
// pageSize改变
handleSizeChange(val) {
this.pagination.pageNum = 1;
this.pagination.pageSize = val;
this.handleSearch();
},
columnSetting(cols) {
this.showDig = false;
this.digColumns = [];
this.columnGroup = [];
this.selectAll = false;
// 点击自定义按钮
this.digColumns = cols;
this.showDig = true;
this.columnGroup = cols.filter(item => item.isShow).map(it => it.label);
this.selectAll = cols.length === this.columnGroup.length;
},
async handleColumnChange() {
this.selectAll = this.digColumns.length === this.columnGroup.length;
},
setAll(val) {
this.columnGroup = val ? this.digColumns.map(item => item.label) : [];
},
saveColumnEvent() {
// 保存
const list = [];
if(this.columnGroup.length < 1){
this.$notify.error({ title: '错误', message: '请至少选择1项结果列!' });
return;
}
this.digColumns.forEach(item => {
if (!this.columnGroup.includes(item.label)) {
list.push({
...item,
isShow: false
});
} else {
list.push({ ...item, isShow: true });
}
});
this.tableColumns = list;
// if (this.activeTab === "bs") {
// this.tableColumns = list;
// } else {
// this.spDefaultColumns = list;
// }
this.$nextTick(() => {
this.$refs.infgidBSTableRef.doLayout()
})
this.showDig = false;
},
buttonClick(key) {
let orInr = this.handleModel.gidinr || this.handleModel.inr;
let name =
key.toUpperCase().substring(0, 1) + key.toLowerCase().substring(1);
this.routerPush({ name, params: { orInr } });
console.log(this.$route.params.orInr,4444);
this.handleVisible=false
},
toDetail(row) {
this.routerPush({
path: "/business/gidinf",
query: { inr: row.inr,opentyp: row.opentyp,hndtyp:row.gidhndtyp,inifrm:'' }
});
},
}
};
</script>
<style scoped>
</style>