Basic.vue 7.53 KB
Newer Older
fukai committed
1
<template>
liuxiaojing committed
2
	<div>
潘际乾 committed
3 4
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
5
				<el-form-item label="业务编号">
潘际乾 committed
6 7
					<c-col :span="24" class="m-inputbtn">
						<c-col class="m-inputbtn-input">
liuxin committed
8
							<c-input  v-model="model.cpdgrp.rec.ownref" maxlength="16"  placeholder="请输入业务编号" disabled></c-input>
潘际乾 committed
9
						</c-col>
liuxin committed
10
						<c-button type="primary" class="m-inputbtn-btn" @click="getOwnref">获取</c-button>
潘际乾 committed
11
					</c-col>
liuxiaojing committed
12
				</el-form-item>
潘际乾 committed
13 14
			</c-col>
		</c-col>
fukai committed
15

潘际乾 committed
16 17
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
18
				<el-form-item label="业务归属机构">
liuxin committed
19
					<c-select v-model="model.cpdgrp.rec.ownbch" style="width:100%" placeholder="请选择">
liuxiaojing committed
20
						<el-option
liuyunfeng committed
21
							v-for="item in codes.bchlevelLst"
liuxiaojing committed
22 23 24 25
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
liuxin committed
26
					</c-select>
liuxiaojing committed
27
				</el-form-item>
潘际乾 committed
28 29
			</c-col>
		</c-col>
liuxiaojing committed
30

潘际乾 committed
31 32
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
33
				<el-form-item label="汇款方式" prop="cpdgrp.rec.paytyp">
liuxin committed
34
					<c-select v-model="model.cpdgrp.rec.paytyp" style="width:100%" placeholder="请选择汇款方式" clearable>
liuxiaojing committed
35 36 37 38 39 40
						<el-option
							v-for="item in codes.paytyp"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
liuxin committed
41
					</c-select>
liuxiaojing committed
42
				</el-form-item>
潘际乾 committed
43 44
			</c-col>
		</c-col>
liuxiaojing committed
45

潘际乾 committed
46 47
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
48
				<el-form-item label="客户经理">
liuxin committed
49
						<c-input  v-model="model.cpdgrp.orc.pty.ownusr" maxlength="10"  placeholder="请输入客户经理"></c-input>
liuxiaojing committed
50
				</el-form-item>
潘际乾 committed
51 52
			</c-col>
		</c-col>
liuxiaojing committed
53

潘际乾 committed
54 55
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
56
				<el-form-item label="汇款币种金额">
潘际乾 committed
57 58
					<c-col :span="24">
						<c-col :span="12" class="m-cur-select">
liuxiaojing committed
59
							<el-form-item prop="cpdgrp.cbs.max.cur">
liuxin committed
60
								<c-select v-model="model.cpdgrp.cbs.max.cur" style="width:100%" placeholder="请选择汇款币种金额" @change="handleMaxCurChange">
liuxiaojing committed
61 62 63 64 65 66
									<el-option
										v-for="item in codes.curtxt"
										:key="item.value"
										:label="item.label"
										:value="item.value">
									</el-option>
liuxin committed
67
								</c-select>
liuxiaojing committed
68
							</el-form-item>
潘际乾 committed
69 70
						</c-col>
						<c-col :span="12">
liuxiaojing committed
71
							<el-form-item prop="cpdgrp.cbs.max.amt">
liuxin committed
72
								<c-input v-model="model.cpdgrp.cbs.max.amt" :precision="2" :step="0.1" :max="100000000000000" placeholder="请输入汇款币种金额"></c-input>
liuxiaojing committed
73
							</el-form-item>
潘际乾 committed
74 75
						</c-col>
					</c-col>
liuxiaojing committed
76
				</el-form-item>
潘际乾 committed
77 78
			</c-col>
		</c-col>
liuxiaojing committed
79

潘际乾 committed
80 81
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
82
				<el-form-item label="汇款人性质" prop="cpdgrp.rec.custyp">
liuxin committed
83
					<c-select v-model="model.cpdgrp.rec.custyp" style="width:100%" placeholder="请选择汇款人性质">
liuxiaojing committed
84 85 86 87 88 89
						<el-option
						v-for="item in codes.ptytyp"
						:key="item.value"
						:label="item.label"
						:value="item.value">
						</el-option>
liuxin committed
90
					</c-select>
liuxiaojing committed
91
				</el-form-item>
潘际乾 committed
92 93
			</c-col>
		</c-col>
liuxiaojing committed
94

潘际乾 committed
95 96 97
		<c-col :span="24">
			<c-col :span="12">
				<c-col :span="22">
liuxiaojing committed
98
					<el-form-item label="清算路径" prop="cpdgrp.rec.liqtyp">
liuxin committed
99
						<c-select v-model="model.cpdgrp.rec.liqtyp" style="width:100%" placeholder="请选择清算路径" @change="handleRecLiqtypChange">
liuxiaojing committed
100 101 102 103 104 105
							<el-option
							v-for="item in liqtyp"
							:key="item.value"
							:label="item.label"
							:value="item.value">
							</el-option>
liuxin committed
106
						</c-select>
liuxiaojing committed
107
					</el-form-item>
潘际乾 committed
108 109
				</c-col>
			</c-col>
liuxiaojing committed
110

潘际乾 committed
111 112
			<c-col :span="12">
				<c-col :span="22">
liuxiaojing committed
113
					<el-form-item label="报文类型" prop="cpdgrp.rec.swftyp">
liuxin committed
114
						<c-select v-model="model.cpdgrp.rec.swftyp" style="width:100%" placeholder="请选择报文类型">
liuxiaojing committed
115 116 117 118 119 120
							<el-option
								v-for="item in swfcod"
								:key="item.value"
								:label="item.label"
								:value="item.value">
							</el-option>
liuxin committed
121
						</c-select>
liuxiaojing committed
122
					</el-form-item>
潘际乾 committed
123 124 125
				</c-col>
			</c-col>
		</c-col>
liuxiaojing committed
126

潘际乾 committed
127 128
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
129
				<el-form-item label="汇款人账号" prop="cpdgrp.rec.orcacc">
liuxin committed
130
					<c-input  v-model="model.cpdgrp.rec.orcacc" maxlength="32"  placeholder="请输入汇款人账号"></c-input>
liuxiaojing committed
131
				</el-form-item>
潘际乾 committed
132 133
			</c-col>
		</c-col>
liuxiaojing committed
134

潘际乾 committed
135 136
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
137
				<el-form-item label="汇款类型" prop="cpdgrp.rec.cpdflg">
liuxin committed
138
					<c-select v-model="model.cpdgrp.rec.cpdflg" style="width:100%" placeholder="请选择汇款类型">
liuxiaojing committed
139 140 141 142 143 144
						<el-option
							v-for="item in codes.custyp"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
liuxin committed
145
					</c-select>
liuxiaojing committed
146
				</el-form-item>
潘际乾 committed
147 148
			</c-col>
		</c-col>
liuxiaojing committed
149

潘际乾 committed
150 151
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
152
				<el-form-item label="汇款人" prop="cpdgrp.orc.pts.namcn">
潘际乾 committed
153 154
					<c-col :span="24" class="m-inputbtn">
						<c-col class="m-inputbtn-input">
liuxin committed
155 156
							<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> -->
傅凯 committed
157
							<c-ptypicker service="cptopn/orcp_ptysel" flag="C" :ctx="model.cpdgrp.orc.pts" :extkey="model.cpdgrp.orc.pts.extkey"  />
潘际乾 committed
158 159
						</c-col>
					</c-col>
liuxiaojing committed
160
				</el-form-item>
潘际乾 committed
161 162
			</c-col>
		</c-col>
liuxiaojing committed
163

潘际乾 committed
164 165
		<c-col :span="12">
			<c-col :span="22">
liuxiaojing committed
166
				<el-form-item label="交易对手国别">
liuxin committed
167
					<c-select v-model="model.cpdgrp.rec.stacty" style="width:100%" placeholder="请输入交易对手国别">
liuxiaojing committed
168 169 170 171 172 173
						<el-option
							v-for="item in codes.bopcur"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
liuxin committed
174
					</c-select>
liuxiaojing committed
175
				</el-form-item>
潘际乾 committed
176 177
			</c-col>
		</c-col>
liuxiaojing committed
178
	</div>
fukai committed
179 180
</template>
<script>
liuyunfeng committed
181
import Api from "~/service/Api"
182
import CommonProcess from "~/mixin/CommonProcess"
liuyunfeng committed
183

fukai committed
184
export default {
185
	inject: ['root'],
186
	mixins: [CommonProcess],
liuxiaojing committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200
	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:{
liuyunfeng committed
201 202 203 204 205 206 207 208 209
		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: '服务请求失败!'});
			}
liuxiaojing committed
210
		},
liuyunfeng committed
211 212 213 214 215 216 217 218 219 220 221 222 223 224
		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}

liuxiaojing committed
225 226 227 228 229 230 231
		},
		handleMaxCurChange () {
			this.model.cpdgrp.rec.liqtyp = ""
			this.model.cpdgrp.rec.swftyp = ""
		},
		handleRecLiqtypChange () {
			this.model.cpdgrp.rec.swftyp = ""
傅凯 committed
232 233
		},
		
liuyunfeng committed
234
	},
liuyunfeng committed
235
	mounted:async function(){
liuyunfeng committed
236 237 238 239 240 241 242 243 244 245 246 247 248
			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: '服务请求失败!'});
			}
    	}
fukai committed
249 250 251 252
}
</script>
<style scoped>
</style>