<template>
  <div>
		<el-col :span="12">
			<el-col :span="22">
				<el-form-item label="收款行账户行（56A）">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.rmt.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_rmtp_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/rmtp_ptysel" flag="B" :ctx="model.setmod.msgmod.rmt.pts" :extkey="model.setmod.msgmod.rmt.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.rmt.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="账号">
					<c-input  v-model="model.setmod.msgmod.rmt.pts.extact" maxlength="32"  placeholder="请输入"></c-input>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="发报行代理行（53A）">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.ori.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_orip_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/orip_ptysel" flag="B" :ctx="model.setmod.msgmod.ori.pts" :extkey="model.setmod.msgmod.ori.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.ori.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="收报行代理行（54A）">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.acs.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_acsp_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/acsp_ptysel" flag="B" :ctx="model.setmod.msgmod.acs.pts" :extkey="model.setmod.msgmod.acs.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.acs.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="收报代理行账号">
					<c-input  v-model="model.setmod.msgmod.acs.pts.extact" maxlength="32"  placeholder="请输入"></c-input>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="扣款币种">
					<el-col :span="24">
						<el-col :span="12" class="m-cur-select">
							<c-select v-model="model.setmod.msgmod.curf33b" style="width:100%" placeholder="请选择汇款币种金额">
								<el-option
									v-for="item in codes.curtxt"
									:key="item.value"
									:label="item.label"
									:value="item.value">
								</el-option>
							</c-select>
						</el-col>
						<el-col :span="12">
							<c-input v-model="model.setmod.msgmod.amtf33b" :precision="2" :step="0.1" :max="100000000000000" placeholder="请输入汇款币种金额"></c-input>
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="费用承担方">
					<c-select v-model="model.setmod.msgmod.chato" style="width:100%" placeholder="请选择">
						<el-option
							v-for="item in codes.chato"
							:key="item.value"
							:label="item.label"
							:value="item.value">
						</el-option>
					</c-select>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="汇款信息(70)">
					<c-input
						v-model="model.setmod.msgmod.contag70"
						type="textarea"
						:rows="3"
						placeholder="">
					</c-input>
				</el-form-item>
			</el-col>
		</el-col>

		<el-col :span="12">
			<el-col :span="22">
				<el-form-item label="收款人开户行（57A）">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.pyb.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_pybp_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/pybp_ptysel" flag="B" :ctx="model.setmod.msgmod.pyb.pts" :extkey="model.setmod.msgmod.pyb.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.pyb.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="账号">
					<c-input  v-model="model.setmod.msgmod.pyb.pts.extact" maxlength="32"  placeholder="请输入"></c-input>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="收报行">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.snd.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_sndp_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/sndp_ptysel" flag="B" :ctx="model.setmod.msgmod.snd.pts" :extkey="model.setmod.msgmod.snd.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.snd.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="收款人（59）">
					<el-col :span="24" class="m-inputbtn">
						<el-col class="m-inputbtn-input">
							<c-input v-model="model.setmod.msgmod.pye.pts.extkey" maxlength="32"  placeholder="请输入"></c-input>
							<!-- <c-button type="primary" icon="el-icon-search" class="m-inputbtn-btn" @click="search_pyep_ptysel"></c-button> -->
							<c-ptypicker service="cptopn/pyep_ptysel" flag="C" :ctx="model.setmod.msgmod.pye.pts" :extkey="model.setmod.msgmod.pye.pts.extkey"  />
						</el-col>
					</el-col>
				</el-form-item>
			</el-col>

			<el-col :span="22" class="form-item">
				<c-input
					v-model="model.setmod.msgmod.pye.pts.adrblk"
					type="textarea"
					:rows="3"
					placeholder="">
				</c-input>
			</el-col>

			<el-col :span="22">
				<el-form-item label="收款人账号">
					<c-input  v-model="model.setmod.msgmod.pye.pts.extact" maxlength="32"  placeholder="请输入"></c-input>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="汇率">
					<c-input v-model="model.cpdgrp.rec.f36" maxlength="32"  placeholder="请输入"></c-input>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="起息日">
					<el-date-picker
						v-model="model.setmod.msgmod.valdat"
						type="date"
						placeholder="选择日期"
						>
					</el-date-picker>
				</el-form-item>
			</el-col>

			<el-col :span="22">
				<el-form-item label="报文附言(72)">
					<c-input
						v-model="model.setmod.msgmod.contag72"
						type="textarea"
						:rows="3"
						placeholder="">
					</c-input>
				</el-form-item>
			</el-col>
		</el-col>

	</div>
</template>
<script>
import Api from "~/service/Api"
import Utils from "~/utils"

export default {
	inject: ['root'],
	props:['model', 'codes'],
	methods: {
		async search_rmtp_ptysel () {
			console.log('搜索收款行账户行')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/rmtp_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		},
		async search_pybp_ptysel () {
			console.log('搜索收款人开户行')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/pybp_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		},
		async search_orip_ptysel () {
			console.log('搜索发报行代理行')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/orip_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		},
		async search_sndp_ptysel () {
			console.log('搜索收报行')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/sndp_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		},
		async search_acsp_ptysel () {
			console.log('搜索收报行代理行')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/acsp_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		},
		async search_pyep_ptysel () {
			console.log('搜索收款人')
			//弹窗选择账户行
			const rtnmsg = await Api.post('cptopn/pyep_ptysel', { data: Utils.flatObject(this.model) ,params:{flg:"B"}})
			if (rtnmsg.code == SUCCESS) {
				// Utils.copyValueFromVO(this.model,rtnmsg.data)
			}
			else {
				this.$notify.error({title: '错误',message: '服务请求失败！'})
			}
		}
	}
}
</script>

<style scope>
.form-item {
	padding-bottom: 10px;
}
</style>