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
<template>
<div class="eibs-tab">
<c-list-search @form-reset="handleReset" @form-search="formSubmit">
<template v-slot:extendsRight>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportExcel">导出</el-button>
</template>
<template v-slot="searchSlot">
<el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small">
<el-row>
<c-col :span="8">
<el-form-item label="单据编号" prop="infcon.seaownref" style="width: 100%">
<c-input v-model="model.infcon.seaownref" maxlength="16" placeholder="请输入单据编号"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="日期" prop="infcon.opndatfrom" style="width: 100%">
<c-col :span="11">
<c-date-picker type="date" v-model="model.infcon.opndatfrom" placeholder="请选择起始日期"
value-format="yyyy-MM-dd" style="width: 100%"></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.infcon.opndatto" placeholder="请选择截至日期"
style="width: 100%"
value-format="yyyy-MM-dd"></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="单据类型" prop="infcon.seadoctyp" style="width: 100%">
<c-select v-model="model.infcon.seadoctyp" dbCode="brdtyp" uil = 'CN' style="width: 100%"
placeholder="请选择单据类型">
</c-select>
</el-form-item>
</c-col>
</el-row>
<el-row v-show="searchSlot.searchToggle">
<c-col :span="8">
<el-form-item label="客户号" prop="infcon.ptyExtkey" style="width: 100%">
<c-input v-model="model.infcon.ptyExtkey" maxlength="24" placeholder="请输入客户号"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="当事人参考号" prop="infcon.searef" style="width: 100%">
<c-input v-model="model.infcon.searef" maxlength="16" placeholder="请输入当事人参考号"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="当事人BIC/名称" prop="infcon.seapty" style="width: 100%">
<c-input v-model="model.infcon.seapty" maxlength="24" placeholder="当事人BIC编码"></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="业务状态" prop="infcon.seasta" style="width: 100%">
<c-select v-model="model.infcon.seasta" style="width: 100%" dbCode="seasta" placeholder="请选择业务状态">
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="币种" prop="infcon.seacur" style="width: 100%">
<c-select v-model="model.infcon.seacur" style="width: 100%" placeholder="请选择币种" dbCode="curtxt">
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="金额区间" prop="infcon.seaamtfr" style="width: 100%">
<c-col :span="11">
<c-input v-model="model.infcon.seaamtfr" placeholder="请输入金额下限" style="width: 100%"></c-input>
</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-input v-model="model.infcon.seaamtto" placeholder="请输入金额上限" style="width: 100%"></c-input>
</c-col>
</el-form-item>
</c-col>
<!-- <c-col :span="8">
<el-form-item label="保兑指示" prop="infcon.seacnfdet" style="width: 100%">
<c-select v-model="model.infcon.seacnfdet" style="width: 100%" placeholder="请选择保兑指示">
<el-option v-for="item in codes.cnfins" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col> -->
<c-col :span="8">
<el-form-item label="是否通过电证系统" prop="infcon.seaelcflg" style="width: 100%">
<c-select v-model="model.infcon.seaelcflg" dbCode="cxmflg" style="width: 100%" placeholder="请选择是否通过电证系统">
</c-select>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item style="text-align: right;" class="checkbox-left">
<c-checkbox v-model="model.infcon.seaforflg" true-label='X' false-label=''>转卖单据</c-checkbox>
</el-form-item>
</c-col>
</el-row>
</el-form>
</template>
</c-list-search>
<div style="height: 90%">
<c-col :span="24">
<el-table
v-loading="load"
ref="configTable"
:data="stmData.data"
:showButtonFlg="true"
height="calc(100vh - 400px)"
size="small"
:border="true"
:highlight-current-row="true"
@sort-change="sortChange"
@row-dblclick="TableDblRow"
>
<el-table-column
v-for="(item, key) in columns"
:key="key + Math.random()"
:label="item.label"
:prop="item.prop"
:min-width="item.width"
sortable="custom"
>
<template slot-scope="scope">
<div v-if="item.prop ==='stagod'">{{getCodelabel(scope.row[item.prop],'stagod')}}</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" prop="op" label="操作" width="140px">
<template slot="header">
<c-col :span="11" style="text-align: center">
<span>操作</span>
</c-col>
<c-button icon="el-icon-s-tools" @click="columnSetting(stmData.columns)"></c-button>
</template>
<template slot-scope="scope">
<c-button style="margin-left: 0" type='primary' size="small" @click="toDetail(scope.row)" slot="reference">Info
</c-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-box">
<el-pagination
style="margin-right: 30px;"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pagination.pageIndex"
:page-sizes="[10, 20, 50, 100, 500]"
:page-size="pagination.pageSize"
layout="total,sizes, prev, pager, next"
:total="pagination.total">
</el-pagination>
</div>
</c-col>
</div>
<!-- 自定义列属性弹框 -->
<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>
</div>
</template>
<script>
import event from '../event'
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
components: {},
data() {
return {
load:false,
column:'',//排序字段
order:'',//正序倒序
selectAll: [], // 是否全选
digColumns: [], // 弹框的所有列
columnGroup: [], // 弹框选中的列
showDig: false, // 弹框的展示/隐藏
// 表格相关
stmData: {
columns: [
{
label: '单据编号',
prop: 'ownref',
width:'160px',
isShow: true
},
{
label: '币种',
prop: 'cur',
width:'80px',
isShow: true
},
{
label: '金额',
prop: 'amt',
width:'150px',
isShow: true
},
{
label: '余额',
prop: 'opnamt',
width:'150px',
isShow: true
},
{
label: '创建日期',
prop: 'credat',
width:'150px',
isShow: true
},
{
label: '闭卷日期',
prop: 'clsdat',
width:'150px',
isShow: true
},
{
label: '客户号',
prop: 'benExtkey',
width:'180px',
isShow: true
},
{
label: '客户名称',
prop: 'benName',
width:'300px',
isShow: true
},
{
label: '申请人名称',
prop: 'aplName',
width:'300px',
isShow: true
},
{
label: '转卖行',
prop: 'pubExtkey',
width:'180px',
isShow: true
},
{
label: '转卖行名称',
prop: 'pubName',
width:'300px',
isShow: true
},
{
label: '转卖日期',
prop: 'resdat',
width:'150px',
isShow: true
},
{
label: '经办柜员',
prop: 'usrNam',
width:'150px',
isShow: true
},
],
data: [],
},
pagination: {
pageIndex: 1,
pageSize: 10,
total: 0
},
// 处理
initdialog: false,
handlerDataList: [],
currentHandleRow: {}
};
},
methods: {},
created: function () {
},
mounted(){
this.getdbCode('godcod','CN','stagod');
this.formSubmit();
},
computed: {
columns() {
return this.stmData.columns.filter(item => item.isShow);
},
},
};
</script>
<style scope>
.m-table-search {
padding: 20px 0px 10px 0px;
}
.pagination-box {
width: 100%;
height: 30px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 10px;
background: #fff;
margin-top: 5px;
}
.el-dialog__body {
padding: 10px 5px 50px;
}
.m-table-search {
padding: 20px 0px 10px 0px;
}
.btn-group-wrap {
max-height: 200px;
width: 100%;
overflow-y: auto;
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-wrap: wrap;
}
.btn-item {
margin-bottom: 10px;
margin-right: 10px;
}
</style>