<template>
  <div class="eibs-tab">
    <!-- <el-col :span="24">
      <span
        v-text="model.trnmod.trndoc.advlabel"
        data-path=".trnmod.trndoc.advlabel"
      >
      </span>
    </el-col>

    <el-col :span="11">
      <el-form-item label="国内证落款">
        <c-input
          v-model="model.trnmod.trndoc.advnam"
          maxlength="50"
          placeholder="请输入国内证落款"
        ></c-input>
      </el-form-item>
    </el-col>

    <el-col :span="11" :offset="1">
      <el-form-item label="修改申请人名称">
        <c-input
          type="textarea"
          v-model="model.trnmod.trndoc.amdapl"
          maxlength="50"
          show-word-limit
          placeholder="请输入修改申请人名称"
        ></c-input>
      </el-form-item>
    </el-col>

    <el-col :span="24">
      <span
        v-text="model.trnmod.trndoc.amdnam"
        data-path=".trnmod.trndoc.amdnam"
      >
      </span>
    </el-col>

    <el-col :span="11">
      <el-form-item label="国内证通知书">
        <c-input
          v-model="model.trnmod.trndoc.advdoc"
          maxlength="1"
          placeholder="请输入国内证通知书"
        ></c-input>
      </el-form-item>
    </el-col> -->
    <el-col :span="12">
      <el-form-item label="Correspondence"> </el-form-item>
    </el-col>

    <!-- <el-col :span="22" offset="1">
      <c-table
        :border="true"
        :list="data"
        style="width:80%,text-align:center"
        height=""
      >
        <el-table-column label="Role" width="auto"></el-table-column>
        <el-table-column label="Description" width="auto"></el-table-column>
        <el-table-column label="Medium" width="auto"></el-table-column>
        <el-table-column label="Dispatch Type" width="auto"></el-table-column>
        <el-table-column label="Lang." width="auto"></el-table-column>
        <el-table-column label="Form" width="auto"></el-table-column>
        <el-table-column label="Or." width="auto"></el-table-column>
        <el-table-column label="CC" width="auto"></el-table-column>
        <el-table-column label="" width="auto"></el-table-column>
        <el-table-column label="" width="auto"></el-table-column>
      </c-table>
    </el-col> -->

    <el-col :span="22" :offset="1">
      <c-istream-table-docpan :list="stmData.data" :columns="stmData.columns">
        <el-table-column label="Medium">
          <template slot-scope="scope">
            <c-select
              v-model="model.trnmod.trndoc.doceot[scope.row.index].cortyp"
              style="width: 100%"
              disabled
              placeholder="请选择"
            >
              <el-option
                v-for="item in codes.doceotCortyp"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="Dispatch Type">
          <template slot-scope="scope">
            <c-select
              v-model="model.trnmod.trndoc.doceot[scope.row.index].docsnf"
              style="width: 100%"
              placeholder="请选择"
            >
              <el-option
                v-for="item in codes.docsnf"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="Lang." width="150%">
          <template slot-scope="scope">
            <c-select
              v-model="model.trnmod.trndoc.doceot[scope.row.index].docuil"
              style="width: 100%"
              placeholder="请选择"
            >
              <el-option
                v-for="item in codes.uiltxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="Form">
          <template slot-scope="scope">
            <c-select
              v-model="model.trnmod.trndoc.doceot[scope.row.index].apf"
              disabled
              style="width: 100%"
              placeholder="请选择"
            >
              <el-option
                v-for="item in codes.apftxt"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="Or." width="65%">
          <template slot-scope="scope">
            <c-input
              v-model="model.trnmod.trndoc.doceot[scope.row.index].apfcpy1"
              :readonly="true"
              style="width: 100%"
              placeholder="请选择"
            >
            </c-input>
          </template>
        </el-table-column>
        <el-table-column label="CC" width="65%">
          <template slot-scope="scope">
            <c-input
              v-model="model.trnmod.trndoc.doceot[scope.row.index].apfcpy2"
              style="width: 100%"
              placeholder="请选择"
            >
            </c-input>
          </template>
        </el-table-column>
        <el-table-column label="">
          <template slot-scope="scope">
            <c-select
              v-model="model.trnmod.trndoc.doceot[scope.row.index].staflg"
              style="width: 100%"
              placeholder="请选择"
            >
              <el-option
                v-for="item in codes.swttlx"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </template>
        </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button
              size="mini"
              :disabled="
                model.trnmod.trndoc.doceot[scope.row.index].pandsc == 'MT799' &&
                model.didgrp.rec.elcflg == 'Y'
              "
              @click="handleDisplay(scope.row.index, scope.row)"
              >显示</el-button
            >
            <el-button
              size="mini"
              type="danger"
              @click="handleDetail(scope.row.index, scope.row)"
              >明细</el-button
            >
          </template>
        </el-table-column>
      </c-istream-table-docpan>
    </el-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Cptopn/Event";

export default {
  inject: ['root'],
  props: ["model", "codes"],
  data() {
    return {
      stmData: {
                columns: [
                    //注释的已改成静态
                    "role Role",
                    "pandsc Description",
                    //"cortyp 类型",
                    //"docsnf 报文格式",
                    //"docuil 语言",
                    //"apf 传送方式"
                ],
                data: [],
      }
    };
  },
  methods: {...Event},
  created: function () {},
};
</script>
<style>
</style>
