<template>
    <div class="eibs-tab">
        <!-- ==============================左边============================== -->
        <c-col :span="12" style="padding-right: 20px;">
            <!-- 结售汇业务参考号 -->
            <c-col :span="24">
                <c-form-item :label="$t('fxtsqo.业务参考号')" prop="fxdgrp.rec.ownref">
                    <c-fullbox>
                        <c-input
                            v-model="model.fxdgrp.rec.ownref"
                            maxlength="16"
                            placeholder="请输入业务编号"
                            disabled
                        >
                        </c-input>
                        <template slot="footer">
                            <c-button
                            style="margin: 0 0"
                            size="small"
                            type="primary"
                            :disabled="model.fxdgrp.apl.pts.ptainr === ''"
                            @click="getOwnref"
                            >
                            获取
                            </c-button>
                        </template>
                    </c-fullbox>
                </c-form-item>
            </c-col>

            <!-- 业务负责人 -->
            <c-col :span="24">
                <c-form-item :label="$t('fxtsqo.业务负责人')" prop="fxdgrp.rec.ownusr">
                    <c-input v-model="model.fxdgrp.rec.ownusr" maxlength="8" disabled></c-input>
                </c-form-item>
            </c-col>

            <!-- 结售汇类型 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.结售汇类型')" prop="fxdgrp.rec.fxtyp">
                    <c-select v-model="model.fxdgrp.rec.fxtyp" :code="codes.fxt_fxtyp" style="width:100%" disabled>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <c-col :span="12">
                    <el-form-item :label="$t('fxtsqo.卖出金额')" prop="fxdgrp.cbs.max.cur">
                        <c-select v-model="model.fxdgrp.cbs.max.cur" :code="codes.bopcur" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="12">
                    <c-form-item label-width="5px" prop="fxdgrp.cbs.max.amt">
                        <c-input v-model="model.fxdgrp.cbs.max.amt" disabled></c-input>
                    </c-form-item>
                </c-col>
            </c-col>

            <c-col :span="24">
                <c-col :span="12">
                    <el-form-item :label="$t('fxtsqo.买入金额')" prop="fxdgrp.cbs.nom1.cur">
                        <c-select v-model="model.fxdgrp.cbs.nom1.cur" :code="codes.bopcur" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="12">
                    <c-form-item label-width="5px" prop="fxdgrp.cbs.nom1.amt">
                        <c-input v-model="model.fxdgrp.cbs.nom1.amt" disabled></c-input>
                    </c-form-item>
                </c-col>
            </c-col>

            <!-- 对外牌价 -->
            <c-col :span="24">
                <c-form-item :label="$t('fxtp.对外牌价')" prop="fxdgrp.rec.rat">
                    <c-input v-model="model.fxdgrp.rec.rat"></c-input>
                </c-form-item>
            </c-col>

            <c-col :span="24">
                <!-- 中间价 -->
                <c-col :span="12">
                    <c-form-item :label="$t('fxtp.中间价')" prop="fxdgrp.rec.midrat">
                        <c-input v-model="model.fxdgrp.rec.midrat"></c-input>
                    </c-form-item>
                </c-col>
                <!-- 钞汇标志 -->
                <c-col :span="12">
                    <el-form-item label-width="5px" prop="fxtp.cshflg">
                        <c-select v-model="model.fxtp.cshflg" :code="codes.cshflg" style="width:100%">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-col>

            <!-- 登记日期 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.登记日期')" prop="fxdgrp.rec.opndat">
                    <c-date-picker type="date" v-model="model.fxdgrp.rec.opndat" style="width:100%" disabled></c-date-picker>
                </el-form-item>
            </c-col>

            <!-- 远期交割日 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.远期交割日')" prop="fxdgrp.rec.setdat">
                    <c-date-picker type="date" v-model="model.fxdgrp.rec.setdat" style="width:100%" disabled></c-date-picker>
                </el-form-item>
            </c-col>

            <!-- 择期交割起始日 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.交割起始日')" prop="fxdgrp.rec.setdatfrm">
                    <c-date-picker type="date" v-model="model.fxdgrp.rec.setdatfrm" style="width:100%" disabled></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <!-- 外币结算账号 -->
                <c-col :span="12">
                    <el-form-item label="外币结算账号" prop="fxdgrp.rec.dsp">
                        <c-select v-model="model.fxdgrp.rec.dsp" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="12">
                    <el-form-item label-width="5px" prop="fxdgrp.rec.acc">
                        <c-select v-model="model.fxdgrp.rec.acc" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-col>

            <!-- 交易主体 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.交易主体')" prop="fxdgrp.rec.trnman">
                    <c-select v-model="model.fxdgrp.rec.trnman" style="width:100%" disabled>
                    </c-select>
                </el-form-item>
            </c-col>            

            <!-- 备注 -->
            <c-col :span="24">
                <c-form-item :label="$t('fxtsqo.备注')" prop="fxdgrp.blk.remark">
                    <c-input type="textarea" v-model="model.fxdgrp.blk.remark" maxlength="35" disabled show-word-limit ></c-input>
                </c-form-item>
            </c-col>
        </c-col>

        <!-- ==============================右边============================== -->
        <c-col :span="12" style="padding-left: 20px;">
            <!-- 名称 -->
            <c-col :span="24">
                <c-form-item :label="$t('fxtsqo.名称')" prop="fxdgrp.rec.nam">
                    <c-input v-model="model.fxdgrp.rec.nam" maxlength="40" disabled></c-input>
                </c-form-item>
            </c-col>
            <!-- 结售汇申请人 -->
            <!-- 编号 -->
            <c-col :span="24">
                <el-card class="box-card">
                    <c-ptap :model="model" :requiredExtkey="true" :disabledExtkey="false" :disabled="true" :isAdrblk="true" :haveAdrLabel="true"
                        :isShowCard="false" :argadr="{ title: '结售汇申请人',grp: 'fxdgrp', rol: 'apl' }" ptytyp="C">
                    </c-ptap>
                </el-card>
            </c-col>


            <!-- 询价编号 -->
            <c-col :span="24">
                <c-form-item label="询价编号" prop="fxdgrp.rec.quoref">
                    <c-input v-model="model.fxdgrp.rec.quoref" maxlength="16"></c-input>
                </c-form-item>
            </c-col>

            <!-- 资金部编号 -->
            <c-col :span="24">
                <c-form-item label="资金部编号" prop="fxdgrp.rec.fudref">
                    <c-input v-model="model.fxdgrp.rec.fudref" maxlength="16"></c-input>
                </c-form-item>
            </c-col>

            <!-- 起息日 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.起息日')" prop="fxdgrp.rec.valdat">
                    <c-date-picker type="date" v-model="model.fxdgrp.rec.valdat" style="width:100%" disabled></c-date-picker>
                </el-form-item>
            </c-col>

            <!-- 择期交割截止日 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.交割截止日')" prop="fxdgrp.rec.setdatto">
                    <c-date-picker type="date" v-model="model.fxdgrp.rec.setdatto" style="width:100%" disabled></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <!-- 本币结算账号 -->
                <c-col :span="12">
                    <el-form-item :label="$t('fxtsqo.本币结算账号')" prop="fxdgrp.rec.dsp2">
                        <c-select v-model="model.fxdgrp.rec.dsp2" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="12">
                    <el-form-item label-width="5px" prop="fxdgrp.rec.acc2">
                        <c-select v-model="model.fxdgrp.rec.acc2" style="width:100%" disabled>
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-col>

            <!-- 结售汇类型 -->
            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.结售汇类型')" prop="fxdgrp.rec.trdint">
                    <c-select v-model="model.fxdgrp.rec.trdint" style="width:100%" disabled>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item :label="$t('fxtsqo.结售汇类型')" prop="fxdgrp.rec.trdout">
                    <c-select v-model="model.fxdgrp.rec.trdout" style="width:100%" disabled>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="" prop="clsflg" label-width="150px" style="float: left;">
                    <c-checkbox v-model="model.mtabut.clsflg" disabled>Close Contract</c-checkbox>
                </el-form-item>
            </c-col>
        </c-col>
    </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import event from "../event";

export default {
    inject: ['root'],
    props: ["model", "codes"],
    mixins: [commonProcess, event],
    data() {
        return {}
    },
    methods: {},
    created: function () {}
}
</script>
<style></style>