<template>
  <div class="eibs-tab">
    <!-- left -->
    <c-col :span="12">
      <c-col :span="24">
        <el-form-item
          label="内部不符点"
          prop="bfdgrp.blk.intdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.intdis"
              maxlength="65"
              show-word-limit
              placeholder="请输入内部不符点"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="注释和结论"
          prop="bfdgrp.blk.comcon"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.comcon"
              maxlength="65"
              show-word-limit
              placeholder="请输入注释和结论"
              disabled
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
                disabled
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="结算指示"
          prop="bfdgrp.blk.setinsbe"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.setinsbe"
              maxlength="150"
              show-word-limit
              placeholder="请输入结算指示"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="不符点"
          prop="bfdgrp.blk.docdis"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              type="textarea"
              v-model="model.bfdgrp.blk.docdis"
              maxlength="50"
              show-word-limit
              placeholder="请输入不符点"
              :disabled="!docdisflg"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin-left: 10px; padding: 0 10px"
                size="small"
                type="primary"
                :disabled="!docdisflg"
              >
                ...
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="寄单状态" prop="bftp.folwupopt">
          <c-fullbox>
            <c-select
              v-model="model.bftp.folwupopt"
              style="width: 100%"
              placeholder="请选择寄单状态"
            >
              <el-option
                v-for="item in codes.folwupopt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
            <template slot="footer">
              <c-checkbox
                v-model="docdisflg"
                style="margin-left: 10px"
                >录入不符点</c-checkbox
              >
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="12">

      <c-col :span="24">
        <el-form-item label="" prop="approvcod">
          <c-checkbox v-model="approvcod">直接不符点寄单</c-checkbox>
        </el-form-item>
      </c-col>

      <c-col :span="24" style="margin-left: 150px">
        <c-checkbox v-model="model.bfdsnd.snd732" disabled
          >Create Advice of Discharge(e.g.MT 732)</c-checkbox
        >
      </c-col>

      <c-col :span="24" style="margin-left: 150px">
        <c-checkbox v-model="model.bftp.cre752flg" disabled
          >Receive MT 752</c-checkbox
        >
      </c-col>

      <c-col :span="24">
        <el-form-item label="Further Identification" prop="bftp.furide">
          <c-select
            v-model="model.bftp.furide"
            style="width: 100%"
            placeholder="请选择Further Identification"
            disabled
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Date of Advice" prop="bfdgrp.rec.disdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.disdat"
            style="width: 100%"
            placeholder="请选择Date of Advice"
            disabled
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="扣减金额" prop="bfdgrp.rec.lescom">
          <c-input
            v-model="model.bfdgrp.rec.lescom"
            placeholder="请输入扣减金额"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <!-- <el-form-item label="议付" prop="bfdsnd.yf">
            <c-input  v-model="model.bfdsnd.yf" maxlength="10"  placeholder="请输入议付"></c-input>
        </el-form-item> -->
        <el-form-item label="议付" prop="bfdsnd.yf" >
          <template>
          <c-radio v-model="model.bfdsnd.yf" label="W">未议付</c-radio>
          <c-radio v-model="model.bfdsnd.yf" label="Y">已议付</c-radio>
        </template>
        </el-form-item>
        
      </c-col>

      <!-- <c-col :span="24">
	    <c-checkbox v-model="model.bfdsnd.ingdsc">CG000354</c-checkbox>
       </c-col> -->
      <c-col :span="24">
        <el-form-item label="" prop="ingdsc">
          <c-checkbox v-model="ingdsc">忽略不符点</c-checkbox>
        </el-form-item>
      </c-col>

      <c-col :span="23" style="margin-left:150px;">
        <c-checkbox v-model="model.bfdgrp.rec.docrolflg" disabled
          >选择寄单行</c-checkbox
        >
      </c-col>

      <c-col :span="24">
        <el-form-item label="Receiver of Documents" prop="bfdgrp.rec.docrol">
          <c-select
            v-model="model.bfdgrp.rec.docrol"
            style="width: 100%"
            placeholder="请选择Receiver of Documents"
            disabled
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
            <c-ptap
            :model="model"
            :argadr="{
                title: '寄单行',
                grp: 'bfdgrp',
                rol: 'ben',
            }"
            :disabled="true"
            :isAdrblk="false"
            :noRef="true"
            >
            </c-ptap>
      </c-col>  
    </c-col>

    <!-- <c-col :span="12">
	    <c-checkbox v-model="model.bfdgrp.blk.docdisflg">Discrepancies modified</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Internal Discrepancies" prop="bfdgrp.blk.intdis">
            <c-input type="textarea" v-model="model.bfdgrp.blk.intdis" maxlength="65" show-word-limit placeholder="请输入Internal Discrepancies" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onIntdisButtxmsel">
            ...
        </c-button>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Processing Options" prop="bftp.folwupopt">
            <c-select v-model="model.bftp.folwupopt" style="width:100%" placeholder="请选择Processing Options">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.bfdgrp.rec.approvcod">Documents on Approval Basis</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.bfdsnd.snd732">Create MT 732</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.bftp.cre752flg">Create 752</c-checkbox>
       </c-col>
                                                    
       <c-col :span="12">
        <el-form-item label="Further Identification" prop="bftp.furide">
            <c-select v-model="model.bftp.furide" style="width:100%" placeholder="请选择Further Identification">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Comments and Conclusions" prop="bfdgrp.blk.comcon">
            <c-input type="textarea" v-model="model.bfdgrp.blk.comcon" maxlength="65" show-word-limit placeholder="请输入Comments and Conclusions" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onComconButtxmsel">
            ...
        </c-button>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Date of Advice" prop="bfdgrp.rec.disdat">
            <c-date-picker type="date"  v-model="model.bfdgrp.rec.disdat" style="width:100%"  placeholder="请选择Date of Advice"></c-date-picker>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Less comm." prop="bfdgrp.rec.lescom">
            <c-input  v-model="model.bfdgrp.rec.lescom"  placeholder="请输入Less comm."></c-input>
        </el-form-item>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Settlement Instructions transaction field" prop="bfdgrp.blk.setinsbe">
            <c-input type="textarea" v-model="model.bfdgrp.blk.setinsbe" maxlength="65" show-word-limit placeholder="请输入Settlement Instructions transaction field" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onSetinstxmButtxmsel">
            ...
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="议付" prop="bfdsnd.yf">
            <c-input  v-model="model.bfdsnd.yf" maxlength="10"  placeholder="请输入议付"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.bfdgrp.rec.docrolflg">Send Documents to Another Address</c-checkbox>
       </c-col>
                                   
       <c-col :span="12">
	    <c-checkbox v-model="model.bfdsnd.ingdsc">Ignore Discrepancies</c-checkbox>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="Receiver of Documents" prop="bfdgrp.rec.docrol">
            <c-select v-model="model.bfdgrp.rec.docrol" style="width:100%" placeholder="请选择Receiver of Documents">
              </c-select>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Discrepancies" prop="bfdgrp.blk.docdis">
            <c-input type="textarea" v-model="model.bfdgrp.blk.docdis" maxlength="50" show-word-limit placeholder="请输入Discrepancies" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary" icon="el-icon-search" @click="onDocdisButtxmsel">
            ...
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="bftp.docp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.bftp.docp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="bfdgrp.doc.pts.extkey">
            <c-input  v-model="model.bfdgrp.doc.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="bftp.docp.ptsget.sdamod.seainf">
            <c-input  v-model="model.bftp.docp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onDocpDet">
            Details
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="名称" prop="bfdgrp.doc.namelc">
            <c-input type="textarea" v-model="model.bfdgrp.doc.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Address Block" prop="bfdgrp.doc.pts.adrblk">
            <c-input type="textarea" v-model="model.bfdgrp.doc.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Chinese address" prop="bfdgrp.doc.dbfadrblkcn">
            <c-input type="textarea" v-model="model.bfdgrp.doc.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="地址" prop="bfdgrp.doc.adrelc">
            <c-input type="textarea" v-model="model.bfdgrp.doc.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col> -->
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Bftsnd/Event";
import Ptap from "~/views/Public/Ptap";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  components: {
    "c-ptap": Ptap,
  },
  data() {
    return {};
  },
  computed: {
    approvcod: {
      get() {
        return this.model.bfdgrp.rec.approvcod === "x";
      },
      set(val) {
        this.model.bfdgrp.rec.approvcod = val ? "" : "x";
      },
    },
    ingdsc: {
      get() {
        return this.model.bfdsnd.ingdsc === "Y";
      },
      set(val) {
        this.model.bfdsnd.ingdsc = val ? "Y" : "";
      },
    },
    docdisflg:{
      get() {
        return this.model.bfdgrp.blk.docdisflg != "";
      },
      set(val) {
        this.model.bfdgrp.blk.docdisflg = val ? "X" : "";
      },
    }
  },
  methods: { ...Event },
  created: function () {},
};
</script>
<style>
</style>
