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

liuxiaojing committed
16 17 18
		<el-col :span="12">
			<el-col :span="22">
				<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 28 29 30 31 32 33
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<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 43 44 45 46 47 48
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<el-form-item label="客户经理">
liuxin committed
49
						<c-input  v-model="model.cpdgrp.orc.pty.ownusr" maxlength="10"  placeholder="请输入客户经理"></c-input>
liuxiaojing committed
50 51 52 53 54 55 56 57 58 59
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<el-form-item label="汇款币种金额">
					<el-col :span="24">
						<el-col :span="12" class="m-cur-select">
							<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 69 70 71
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<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 74 75 76 77 78 79 80 81 82
							</el-form-item>
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<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 92 93 94 95 96 97 98
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="24">
			<el-col :span="12">
				<el-col :span="22">
					<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 108 109 110 111 112 113
					</el-form-item>
				</el-col>
			</el-col>

			<el-col :span="12">
				<el-col :span="22">
					<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 123 124 125 126 127 128 129
					</el-form-item>
				</el-col>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<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 132 133 134 135 136 137
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<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 147 148 149 150 151 152 153 154
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<el-form-item label="汇款人" prop="cpdgrp.orc.pts.namcn">
					<el-col :span="24" class="m-inputbtn">
						<el-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"  />
liuxiaojing committed
158 159 160 161 162 163 164 165 166
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<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 176 177 178
				</el-form-item>
			</el-col>
		</el-col>
	</div>
fukai committed
179 180
</template>
<script>
liuyunfeng committed
181 182
import Api from "~/service/Api"

fukai committed
183
export default {
liuxiaojing committed
184 185 186 187 188 189 190 191 192 193 194 195 196 197
	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
198 199 200 201 202 203 204 205 206
		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
207
		},
liuyunfeng committed
208 209 210 211 212 213 214 215 216 217 218 219 220 221
		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
222 223 224 225 226 227 228
		},
		handleMaxCurChange () {
			this.model.cpdgrp.rec.liqtyp = ""
			this.model.cpdgrp.rec.swftyp = ""
		},
		handleRecLiqtypChange () {
			this.model.cpdgrp.rec.swftyp = ""
傅凯 committed
229 230
		},
		
liuyunfeng committed
231
	},
liuyunfeng committed
232
	mounted:async function(){
liuyunfeng committed
233 234 235 236 237 238 239 240 241 242 243 244 245
			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
246 247 248 249
}
</script>
<style scoped>
</style>