<template>
  <div class="eibs-tab">
    <!-- ======================= 左边 ========================= -->
    <c-col :span="12" style="padding-right: 20px">
      <c-col :span="24">
        <el-form-item label="资金来源:网银购汇" prop="gedmod.zjly">
          <c-select placeholder="请输入资金来源:网银购汇" style="width:100%" v-model="model.gedmod.zjly" dbCode="CGYN" @change="initGedmod()">
          </c-select>
        </el-form-item>
      </c-col>
      <!-- S0000003 : 购汇额度编号 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
          <c-fullbox>
            <el-form-item label="购汇额度编号" prop="gedmod.dzghxx.ghedbh">
                <c-input placeholder="请输入购汇额度编号" customModifykey="gedmod.dzghxx.ghedbh" maxlength="16" v-model="model.gedmod.dzghxx.ghedbh"></c-input>
            </el-form-item>
            <template slot="footer">
              <c-button size="small" type="primary" @click="queryGhedbh()">
                查询
              </c-button>
            </template>
          </c-fullbox>
      </c-col>
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <el-form-item label="客户号" prop="gedmod.dzghxx.ecifno">
          <c-input disabled placeholder="请输入客户号" maxlength="10" v-model="model.gedmod.dzghxx.ecifno"></c-input>
        </el-form-item>
      </c-col>
      <!-- S0000013 : 客户外币账号 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <el-form-item label="客户外币账号" prop="gedmod.dzghxx.wibzhh">
          <c-input disabled placeholder="请输入客户外币账号" maxlength="20" v-model="model.gedmod.dzghxx.wibzhh"></c-input>
        </el-form-item>
      </c-col>
      <!-- S0000007 : 已购未付金额 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <c-col :span="12">
          <el-form-item label="已购未付金额" prop="gedmod.dzghxx.cur">
            <c-select disabled v-model="model.gedmod.dzghxx.cur" style="width:100%" placeholder="" dbCode="curtxt">
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label-width="5px" prop="gedmod.dzghxx.amtgwf">
            <c-input-currency disabled :currency="model.gedmod.dzghxx.cur" v-model="model.gedmod.dzghxx.amtgwf" placeholder=""></c-input-currency>
          </el-form-item>
        </c-col>
      </c-col>
      <!-- S0000016 : 本次付汇金额 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <c-col :span="12">
          <el-form-item label="本次付汇金额" prop="gedmod.dzghxx.cur">
            <c-select disabled v-model="model.gedmod.dzghxx.cur" style="width:100%" placeholder="" dbCode="curtxt">
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label-width="5px" prop="gedmod.dzghxx.amtunfrez">
            <c-input-currency :currency="model.gedmod.dzghxx.cur" v-model="model.gedmod.dzghxx.amtunfrez" placeholder=""></c-input-currency>
          </el-form-item>
        </c-col>
      </c-col>
      <!-- S0000015 : 额度状态 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <el-form-item label="额度状态" prop="gedmod.dzghxx.edusta">
          <c-select disabled placeholder="请输入额度状态" style="width:100%" v-model="model.gedmod.dzghxx.edusta" dbCode="EDUSTA">
          </c-select>
        </el-form-item>
      </c-col>
      <!-- S0000005 : 人民币账号类型 -->
      <c-col :span="24" v-if="model.gedmod.zjly=='1'">
        <el-form-item label="人民币账号类型" prop="gedmod.dzghxx.rmzhlx">
          <c-select placeholder="请输入人民币账号类型" style="width:100%" v-model="model.gedmod.dzghxx.rmzhlx" :code="codes.rmzhlx">
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>
    <!-- ======================= 右边 ========================= -->
    <c-col :span="12" style="padding-left: 20px">
    </c-col>
  </div>
</template>
<script>
import Event from "../event";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [Event],
  data() {
    return {};
  },
  methods: {},
  created: function() {},
  watch:{
    "model.gedmod.dzghxx.ghedbh":{
      handler(newVal) {
        if (newVal === '') {
          this.model.gedmod.dzghxx.amtgwf = '';
          this.model.gedmod.dzghxx.edusta = '';
          this.model.gedmod.dzghxx.wibzhh = '';
          this.model.gedmod.dzghxx.rmbzhh = '';
          this.model.gedmod.dzghxx.paytyp = '';
        }
      },
      immediate:true
    }
  },
};
</script>
<style>
</style>