<template>
  <div>
		<c-col :span="12">
			<c-col :span="22">
				<el-form-item label="收款行账户行（56A）">
					<c-col :span="24" class="m-inputbtn">
						<c-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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-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>
			</c-col>

			<c-col :span="22">
				<el-form-item label="发报行代理行（53A）">
					<c-col :span="24" class="m-inputbtn">
						<c-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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-col :span="22">
				<el-form-item label="收报行代理行（54A）">
					<c-col :span="24" class="m-inputbtn">
						<c-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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-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>
			</c-col>

			<c-col :span="22">
				<el-form-item label="扣款币种">
					<c-col :span="24">
						<c-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>
						</c-col>
						<c-col :span="12">
							<c-input v-model="model.setmod.msgmod.amtf33b" :precision="2" :step="0.1" :max="100000000000000" placeholder="请输入汇款币种金额"></c-input>
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

			<c-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>
			</c-col>

			<c-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>
			</c-col>
		</c-col>

		<c-col :span="12">
			<c-col :span="22">
				<el-form-item label="收款人开户行（57A）">
					<c-col :span="24" class="m-inputbtn">
						<c-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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-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>
			</c-col>

			<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.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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-col :span="22">
				<el-form-item label="收款人（59）">
					<c-col :span="24" class="m-inputbtn">
						<c-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"  />
						</c-col>
					</c-col>
				</el-form-item>
			</c-col>

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

			<c-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>
			</c-col>

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

			<c-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>
			</c-col>

			<c-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>
			</c-col>
		</c-col>

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

export default {
	inject: ['root'],
	mixins: [CommonProcess],
	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>