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
<template>
<div class="eibs-tab">
<!-- ======================= 左边 ========================= -->
<c-col :span="12" style="padding-right: 20px">
<c-col :span="24">
<el-form-item :label="$t('hitame.保函编号')" prop="nidgrp.rec.ownref">
<c-input disabled v-model="model.nidgrp.rec.ownref" maxlength="16" placeholder="请输入保函编号"></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item :label="$t('hitame.修改日期')" prop="swiadd.amedat">
<c-date-picker type="date" v-model="model.swiadd.amedat" style="width: 100%" placeholder="请选择修改日期" @change="amedatChange">
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item :label="$t('hitame.原保函金额')" prop="oldnidgrp.cbs.max.cur">
<c-input disabled v-model="model.oldnidgrp.cbs.max.cur" maxlength="3" placeholder="请输入原保函金额"></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label-width="5px" prop="oldnidgrp.cbs.max.amt">
<c-input-currency disabled v-model="model.oldnidgrp.cbs.max.amt" :currency="model.oldnidgrp.cbs.max.cur" placeholder="请输入"></c-input-currency>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item :label="$t('hitame.修改金额')" prop="swiadd.amecur">
<c-input disabled v-model="model.swiadd.amecur" maxlength="3" @change="calcName" placeholder="请输入修改金额"></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label-width="5px" prop="swiadd.ameamt">
<c-input-currency :disabled="model.nidgrp.ghdflg == ''" v-model="model.swiadd.ameamt" :currency="model.swiadd.amecur" @change="calcNewamt" placeholder="请输入"></c-input-currency >
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<el-form-item :label="$t('hitame.保函币种和金额')" prop="swiadd.newcur">
<c-input disabled v-model="model.swiadd.newcur" maxlength="3" @change="calcName" placeholder="请选择保函金额"></c-input>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item label-width="5px" prop="swiadd.newamt">
<c-input-currency :disabled="model.nidgrp.ghdflg == ''" v-model="model.swiadd.newamt" :currency="model.swiadd.newcur" @change="calcAmeamt" placeholder="请输入"></c-input-currency>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<el-form-item :label="$t('hitame.面函标题')" prop="nitamep.mstitle">
<c-input maxlength="60" :disabled="model.nidgrp.ghdflg==''" type="textarea" v-model="model.nitamep.mstitle" show-word-limit placeholder="请输入面函标题" @change="setMstitleModified">
</c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item :label="$t('hitpam.简式修改内容')">
<c-checkbox
:disabled="model.nidgrp.ghdflg=='' || model.nidgrp.ghdflg=='2'"
v-model="model.nitamep.plateflg"
true-label="X"
false-label=""
@change="changenPlateflg"
class="checkbox-left"
>简式修改</c-checkbox>
<c-checkbox
:disabled="model.nidgrp.ghdflg==''"
v-model="model.nitamep.prtflg"
true-label="X" false-label=""
@change="chooseFulltext"
class="checkbox-left"
>全文修改</c-checkbox>
</el-form-item>
</c-col>
<!-- <c-col :span="24" style="display: flex;align-item: center;justify-content: space-between;">
<div style="width: calc(100% - 92px);">
<el-form-item label="简式修改内容" prop="swiadd.ameblk">
<c-mul-row-input @change="ameblkChange" :rows="850" :cols="65" :autosize="{minRows: 10, maxRows: 1000}" :disabled="model.nidgrp.ghdflg==''|| model.nitamep.plateflg==''" v-model="model.swiadd.ameblk" maxlength="21845" show-word-limit placeholder="请输入修改内容文本"></c-mul-row-input>
</el-form-item>
</div>
<div style="width:72px">
<c-checkbox :disabled="model.nidgrp.ghdflg=='' || model.nidgrp.ghdflg=='2'" v-model="model.nitamep.plateflg" true-label="X" false-label="" @change="changenPlateflg" class="checkbox-left">简式修改</c-checkbox>
<c-checkbox :disabled="model.nidgrp.ghdflg==''" v-model="model.nitamep.prtflg" true-label="X" false-label="" @change="chooseFulltext" class="checkbox-left">
全文修改</c-checkbox>
</div>
</c-col> -->
</c-col>
<!-- ======================右边====================== -->
<c-col :span="12" style="padding-left: 20px">
<c-col :span="24">
<el-form-item :label="$t('hitame.修改次数')" prop="nitamep.amenbr">
<c-input-number :max="999" placeholder="请输入修改次数" v-model="model.nitamep.amenbr" @change="amenbrChange"></c-input-number>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item :label="$t('hitame.实际修改次数')" prop="nidgrp.rec.amenbr">
<c-input-number disabled v-model="model.nidgrp.rec.amenbr" placeholder="请输入实际修改次数"></c-input-number>
</el-form-item>
</c-col>
<c-col :span="24">
<c-col :span="16">
<el-form-item label="原有效期" prop="oldnidgrp.rec.expdat">
<c-date-picker disabled placeholder="请选择原有效期" style="width: 100%" type="date" v-model="model.oldnidgrp.rec.expdat"></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item class="checkbox-left" label-width="10px">
<c-checkbox disabled class="checkbox-left" false-label="" true-label="X" v-model="model.oldnidgrp.rec.expflg">
效期敞口
</c-checkbox>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="16">
<el-form-item label="新有效期" prop="swiadd.newexpdat">
<c-date-picker :disabled="model.swiadd.newexpflg=='X'||model.nidgrp.ghdflg==''" @change="defaultNidgrpRecExpdatN10000"
placeholder="请输入新有效期" type="date" v-model="model.swiadd.newexpdat">
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="8" class="centerLable">
<el-form-item class="checkbox-left" label-width="10px">
<c-checkbox true-label="X" false-label="" disabled v-model="model.swiadd.newexpflg" @change="setExpnewtxtUnlimited" class="checkbox-left">效期敞口</c-checkbox>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24" v-if="model.nidgrp.rec.hndtyp == 'OT'">
<c-col :span="16">
<el-form-item :label="$t('hitopn.原反担保有效期')" prop="oldnidgrp.rec.liadat" >
<c-date-picker disabled type="date" v-model="model.oldnidgrp.rec.liadat"></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="8" class="checkbox-left" label-width="10px">
<el-form-item label="" prop="oldnidgrp.rec.liaflg" class="checkbox-left" label-width="10px">
<c-checkbox disabled v-model="model.oldnidgrp.rec.liaflg" true-label='X' false-label='' >原反担保效期敞口</c-checkbox>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24" v-if="model.nidgrp.rec.hndtyp == 'OT'">
<c-col :span="16">
<el-form-item :label="$t('hitopn.新反担保有效期')" prop="swiadd.newliadat" >
<c-date-picker type="date" v-model="model.swiadd.newliadat" placeholder="请选择反担保有效期" :disabled=" model.nidgrp.rec.liaflg == 'X'"></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="8" class="checkbox-left" label-width="10px">
<el-form-item label="" prop="swiadd.newliaflg" class="checkbox-left" label-width="10px">
<c-checkbox v-model="model.swiadd.newliaflg" true-label='X' false-label='' disabled @change="clearLiadatData">新反担保效期敞口</c-checkbox>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<el-form-item :label="$t('hitpop.其他海关已选')" prop="nidgrp.rec.ptyhgq">
<c-fullbox>
<c-input type="textarea" autosize :rows="4" v-model.trim="ptyhgqName" placeholder="" @keyup.enter.native="showHGDialog()"
disabled :customModifykey="'nidgrp.rec.ptyhgq'"></c-input>
<template slot="footer">
<c-button type="primary" size="small" icon="el-icon-search" style="margin:0 10px 0 10px;padding: 0 12px;" :disabled="model.nidgrp.ghdflg == ''" @click="showHGDialog()">
</c-button>
</template>
</c-fullbox>
</el-form-item>
</c-col>
<c-col :span="24">
<div style="width: calc(100% - 120px);margin-left: 120px;display: flex;align-item: center;justify-content: space-between;">
<div style="width: 84px;">
<el-form-item label-width="0" prop="nidgrp.rec.cxmflg">
<c-checkbox v-model="model.nidgrp.rec.cxmflg" true-label="Y" false-label="N" >生成查询码</c-checkbox>
</el-form-item>
</div>
</div>
</c-col>
</c-col>
<!-- 弹窗 -->
<el-dialog v-dialogDrag v-if="visible" :visible="visible" title="其他海关" width="50%" :before-close="handleClose">
<div style="text-align: center">
<el-transfer
style="text-align: left; display: inline-block;"
:data="codes.transferData"
v-model="model.checkedList"
filterable
:titles="['未添加', '已添加']"
:button-texts="['移除', '添加']"
:props="{
key: 'extkey',
label: 'nam'
}"
:format="{
noChecked: '${total}',
hasChecked: '${checked}/${total}',
}">
<span slot-scope="{ option }">{{ option.extkey }} - {{ option.nam }}</span>
</el-transfer>
</div>
<span slot="footer" class="dialog-footer">
<c-button @click="cancel">取消</c-button>
<c-button type="primary" @click="save()">保存</c-button>
</span>
</el-dialog>
</div>
</template>
<script>
import event from "../event";
import Default from "../model/default";
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import commonDepend from '~/mixin/commonDepend.js';
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event,Default,commonDepend],
data() {
return {
mstitleModified: false,
keyword: '',
visible: false,
transferData: [],
//checkedList: [],
};
},
computed: {
ptyhgqName: {
get() {
let nameStr = ''
let nameArr = []
//页面初始化,从数据库里带出数据
let oldptyhgq =[];
oldptyhgq = this.model.nidgrp.rec.ptyhgq.split("@");
if(this.model.checkedList.length==0&&oldptyhgq.length!=0){
if (this.codes.markList && this.codes.markList.length > 0) {
this.codes.markList.map((item) => {
if (oldptyhgq.includes(item.extkey)) {
nameArr.push(item.nam)
}
})
nameStr = nameArr.join('、')
}
}
//从弹出框里重新选择
if (this.codes.markList && this.codes.markList.length > 0) {
this.codes.markList.map((item) => {
if (this.model.checkedList.includes(item.extkey)) {
nameArr.push(item.nam)
}
})
nameStr = nameArr.join('、')
}
this.model.nidgrp.bencnt = nameArr.length ? nameArr.length + 1 : 1;
return nameStr
},
set(val) {
this.$emit('input', val)
}
}
},
methods: {
showHGDialog() {
this.visible = true;
this.formatNameToChecked(this.model.nidgrp.rec.ptyhgq);
this.getHaiGuanData();
// 通过nam值遍历出checkList
// let list = [];
// if(this.model.nidgrp.rec.ptyhgq){
// list = this.model.nidgrp.rec.ptyhgq.split('、');
// }
// this.codes.markList.forEach(item => {
// if(list.includes(item.nam)) {
// this.checkedList.push(item.inr);
// }else{
// return
// }
// })
},
handleClose(done) {
this.visible = false;
done();
},
cancel() {
this.visible = false;
// 取消后,需要刷新文本区域的其它海关的值
this.formatNameToChecked(this.model.nidgrp.rec.ptyhgq);
},
async save() {
const rightData = [];
this.codes.transferData.forEach(item => {
if (this.model.checkedList.includes(item.extkey)) {
rightData.push({
extkey: item.extkey,
nam: item.nam,
inr: item.inr
});
}
});
let str = this.model.checkedList.length ? this.model.checkedList.join("@") + "@" : "";
this.model.nidgrp.rec.ptyhgq = str;
console.log(this.model.nidgrp.rec.ptyhgq,"this.model.nidgrp.rec.ptyhgq")
this.model.ptyList = rightData;
this.visible = false;
//this.model.nidgrp.bencnt = this.model.checkedList.length ? this.model.checkedList.length + 1 : 1;
this.customAddModify(this.model.nidgrp.rec, 'ptyhgq')
}
},
mounted() {
},
watch: {
'model.ptyList'(newValue) {
if(newValue && newValue.length > 0) {
newValue.forEach(item => {
this.model.checkedList.push(item.extkey);
});
}
}
},
created: function() {}
};
</script>
<style scoped lang="less">
.eibs-tab{
/deep/ .el-transfer-panel {
width: 216px;
height: 400px;
}
/deep/ .el-checkbox-group.el-transfer-panel__list {
height: 296px;
}
/deep/ .el-checkbox {
float: left;
text-align: left;
}
/deep/ .el-transfer-panel__header .el-checkbox {
float: left;
text-align: left;
position: absolute;
}
/deep/ .el-transfer-panel__header .el-checkbox .el-checkbox__label span {
position: relative;
left: 100px;
float: right;
}
}
</style>