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
<template>
<div>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="业务编号">
<c-col :span="24" class="m-inputbtn">
<c-col class="m-inputbtn-input">
<c-input v-model="model.cpdgrp.rec.ownref" maxlength="16" placeholder="请输入业务编号" disabled></c-input>
</c-col>
<c-button type="primary" class="m-inputbtn-btn" @click="getOwnref">获取</c-button>
</c-col>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="业务归属机构">
<c-select v-model="model.cpdgrp.rec.ownbch" style="width:100%" placeholder="请选择">
<el-option
v-for="item in codes.bchlevelLst"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款方式" prop="cpdgrp.rec.paytyp">
<c-select v-model="model.cpdgrp.rec.paytyp" style="width:100%" placeholder="请选择汇款方式" clearable>
<el-option
v-for="item in codes.paytyp"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="客户经理">
<c-input v-model="model.cpdgrp.orc.pty.ownusr" maxlength="10" placeholder="请输入客户经理"></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款币种金额">
<c-col :span="24">
<c-col :span="12" class="m-cur-select">
<el-form-item prop="cpdgrp.cbs.max.cur">
<c-select v-model="model.cpdgrp.cbs.max.cur" style="width:100%" placeholder="请选择汇款币种金额" @change="handleMaxCurChange">
<el-option
v-for="item in codes.curtxt"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="12">
<el-form-item prop="cpdgrp.cbs.max.amt">
<c-input v-model="model.cpdgrp.cbs.max.amt" :precision="2" :step="0.1" :max="100000000000000" placeholder="请输入汇款币种金额"></c-input>
</el-form-item>
</c-col>
</c-col>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款人性质" prop="cpdgrp.rec.custyp">
<c-select v-model="model.cpdgrp.rec.custyp" style="width:100%" placeholder="请选择汇款人性质">
<el-option
v-for="item in codes.ptytyp"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="24">
<c-col :span="12">
<c-col :span="22">
<el-form-item label="清算路径" prop="cpdgrp.rec.liqtyp">
<c-select v-model="model.cpdgrp.rec.liqtyp" style="width:100%" placeholder="请选择清算路径" @change="handleRecLiqtypChange">
<el-option
v-for="item in liqtyp"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="报文类型" prop="cpdgrp.rec.swftyp">
<c-select v-model="model.cpdgrp.rec.swftyp" style="width:100%" placeholder="请选择报文类型">
<el-option
v-for="item in swfcod"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款人账号" prop="cpdgrp.rec.orcacc">
<c-input v-model="model.cpdgrp.rec.orcacc" maxlength="32" placeholder="请输入汇款人账号"></c-input>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款类型" prop="cpdgrp.rec.cpdflg">
<c-select v-model="model.cpdgrp.rec.cpdflg" style="width:100%" placeholder="请选择汇款类型">
<el-option
v-for="item in codes.custyp"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="汇款人" prop="cpdgrp.orc.pts.namcn">
<c-col :span="24" class="m-inputbtn">
<c-col class="m-inputbtn-input">
<c-input v-model="model.cpdgrp.orc.pts.namcn" maxlength="100" placeholder="请输入汇款人"></c-input>
<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="handleSearch"></c-button> -->
<c-ptypicker service="cptopn/orcp_ptysel" flag="C" :ctx="model.cpdgrp.orc.pts" :extkey="model.cpdgrp.orc.pts.extkey" />
</c-col>
</c-col>
</el-form-item>
</c-col>
</c-col>
<c-col :span="12">
<c-col :span="22">
<el-form-item label="交易对手国别">
<c-select v-model="model.cpdgrp.rec.stacty" style="width:100%" placeholder="请输入交易对手国别">
<el-option
v-for="item in codes.bopcur"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</c-select>
</el-form-item>
</c-col>
</c-col>
</div>
</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess"
export default {
inject: ['root'],
mixins: [CommonProcess],
props:['model', 'codes'],
computed: {
liqtyp: function () {
if (this.model.cpdgrp.cbs.max.cur) {
return this.model.cpdgrp.cbs.max.cur == 'CNY' ? this.codes.liqtyp2 : this.codes.liqtyp1
} else {
return this.codes.liqtyp
}
},
swfcod: function () {
return this.model.cpdgrp.rec.liqtyp ? this.codes.swfcod[this.model.cpdgrp.rec.liqtyp] || []: []
}
},
methods:{
async getOwnref () {
console.log('获取业务编号')
const rtnmsg = await Api.post('cptopn/getref', { data: this.model })
if (rtnmsg.code == SUCCESS) {
this.model.cpdgrp.rec.ownref = rtnmsg.data.cpdgrp_rec_ownref
}
else {
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async handleSearch () {
console.log('汇款人查询')
const rtnmsg = await Api.post('cptopn/orcp_ptysel', { data: this.model ,flg:'C'})
if (rtnmsg.code == SUCCESS) {
// this.model.cpdgrp.rec.ownref = rtnmsg.data.cpdgrp_rec_ownref
}
else {
this.$notify.error({title: '错误',message: '服务请求失败!'});
// Notification.error({ message: 'cptopn/mtabut/getref服务端请求失败!' })
}
// Ptspta1 model={this.model}
// argArr={{ desc: "汇款人", prefix: 'pts', url: 'cptopn/orcp_ptysel',
// flg: 'C', datakey: '\\cptp\\orcp\\ptslst' }} formBlur={this.formBlur}
},
handleMaxCurChange () {
this.model.cpdgrp.rec.liqtyp = ""
this.model.cpdgrp.rec.swftyp = ""
},
handleRecLiqtypChange () {
this.model.cpdgrp.rec.swftyp = ""
},
},
mounted:async function(){
console.log("初始化,加载机构列表");
let rtnmsg = await Api.post("common/bchlevelLst",{params:{}})
if(rtnmsg.code == SUCCESS)
{
//TODO 处理数据逻辑
let bchlst = rtnmsg.data;
this.codes.bchlevelLst = bchlst.map(item=>({value:item.branch,label:item.namcn}));
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
}
}
</script>
<style scoped>
</style>