<template>
  <div class="eibs-tab">
    <!-- <c-list-search @form-reset="handleReset" @form-search="handleSearch"> -->
    <!-- <template v-slot="searchSlot"> -->
      <div style="border-bottom: 10px solid rgb(232, 232, 232);">
    <el-form
      class="m-table-search-form"
      ref="paramsForm"
      :inline="true"
      label-position="right"
      label-width="110px"
      size="small"
    >
      <el-row>
        <c-col :span="23">
          <c-col :span="8">
            <el-form-item
              label="业务编号"
              prop="trncorco.ownref"
              style="width: 100%"
            >
              <c-input
                v-model="model.trncorco.ownref"
                maxlength="16"
                placeholder="请输入Reference"
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="8">
            <el-form-item label="创建时间" style="width: 100%">
              <c-col :span="11">
                <c-date-picker
                  type="date"
                  v-model="model.trncorco.inidatfro"
                  style="width: 100%"
                  placeholder="请选择Date of entry of Transaction"
                ></c-date-picker>
              </c-col>
              <c-col :span="2" style="text-align: center">
                <label style="display: inline-block; width: 100%">-</label>
              </c-col>
              <c-col :span="11">
                <c-date-picker
                  type="date"
                  v-model="model.trncorco.inidattil"
                  style="width: 100%"
                  placeholder="请选择Date of entry of Transaction until"
                ></c-date-picker>
              </c-col>
            </el-form-item>
          </c-col>

          <c-col :span="8">
            <el-form-item label="经办柜员" prop="usrcon" style="width: 100%">
              <c-select
                v-model="model.usrcon"
                style="width: 100%"
                placeholder="请选择User"
              >
                <el-option
                  v-for="item in codes.usrsort"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>
      </el-row>
      <!--            
                    <c-col :span="12">
                      <el-form-item label="Drag  Drop Sender">
                          <c-input  v-model="model.atpget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
                      </el-form-item>
                    </c-col>
                    -->
      <el-row>
        <c-col :span="23">
          <c-col :span="8">
            <el-form-item
              label="业务状态"
              prop="trncorco.relflg"
              style="width: 100%"
            >
              <c-select
                v-model="model.trncorco.relflg"
                style="width: 100%"
                placeholder="请选择Status"
              >
                <el-option
                  v-for="item in relflgCodes"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </el-form-item>
          </c-col>

          <c-col :span="8">
            <el-form-item label="业务机构" prop="bchcon" style="width: 100%">
              <c-select
                v-model="model.bchcon"
                style="width: 100%"
                placeholder="请选择Branch"
              >
                <el-option
                  v-for="item in codes.bchtyp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </el-form-item>
          </c-col>

          <!--                           
                    <c-col :span="12">
                      <el-form-item label="and">
                          
                      </el-form-item>
                    </c-col> -->

          <c-col :span="8">
            <el-form-item label="交易代码" prop="atp.cod" style="width: 100%">
              <c-col :span="24">
                <c-col :span="20">
                  <c-input
                    v-model="model.atp.cod"
                    maxlength="6"
                    style="width: 95%"
                    placeholder="请输入Transaction Type "
                  ></c-input>
                </c-col>
                <!-- <c-input  v-model="model.atpget.sdamod.seainf"  style="width:10%" placeholder="i"></c-input> -->

                <c-col :span="4">
                  <c-button
                    size="small"
                    style="width: 100%; margin-left: 0"
                    type="primary"
                    @click="onSeainf"
                    icon="el-icon-search"
                  ></c-button>
                </c-col>
              </c-col>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="23">
          <c-col :span="8">
            <el-form-item
              label="业务标志"
              prop="trncorco.dflg"
              style="width: 100%"
            >
              <c-select
                v-model="model.trncorco.dflg"
                style="width: 100%"
                placeholder="请选择业务标志"
              >
                <el-option
                  v-for="item in codes.dflg"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </el-form-item>
          </c-col>

          <c-col :span="8">
            <el-form-item label="交易名称" prop="atptxt" style="width: 100%">
              <c-input
                v-model="model.atptxt"
                maxlength="37"
                placeholder="请输入Transaction Text"
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="8" style="text-align: right">
            <el-button size="small" @click="handleReset">重置</el-button>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="small"
              @click="handleSearch"
              >查询</el-button
            >
          </c-col>
        </c-col>
      </el-row>
    </el-form>
      </div>
    <!-- </template> -->
    <!-- </c-list-search> -->

    <!--                            
       <c-col :span="12">
        <el-form-item label="List of transaction sfor display">
            <c-input  v-model="model.trncorco.trnstm"  placeholder="请输入List of transaction sfor display"></c-input>
        </el-form-item>
       </c-col>             
                  
       <c-col :span="12">
        <el-form-item label="# of transactions">
            <c-input  v-model="model.numtrn"  placeholder="请输入# of transactions"></c-input>
        </el-form-item>
       </c-col>
       -->

    <!-- <div style="margin-top:20px;"> -->

    <!-- <c-button size="small" type="primary" @click="onSeaown">
        Search Own
      </c-button>

      <c-button size="small" type="primary" @click="onSeajbh">
        Search All
      </c-button>  -->

    <!-- <c-button
        size="small"
        type="primary"
        disabled="disabled"
        @click="onImgmodNewimg"
      >
        Img
      </c-button>
      <c-button
        size="small"
        type="primary"
        disabled="disabled"
        @click="onImgmodNewhisimg"
      >
        His.img
      </c-button>
      <c-button
        size="small"
        type="primary"
        disabled="disabled"
        @click="onDiaconButdia"
      >
        Diaries
      </c-button>
      <c-button
        size="small"
        type="primary"
        disabled="disabled"
        @click="onImgmodHisimg"
      >
        Old.img
      </c-button>
      <c-button
        size="small"
        type="primary"
        :disabled="relrowDisabled"
        @click="onRelrow"
      >
        Release
      </c-button>
      <c-button
        size="small"
        type="primary"
        disabled="disabled"
        @click="onReprow"
      >
        Repair
      </c-button>
      <c-button
        size="small"
        type="primary"
        :disabled="relrowDisabled"
        @click="onRejrow"
      >
        Reject
      </c-button>
      <c-button size="small" type="primary" @click="onExi"> Exit </c-button> -->
    <!-- </div> -->

    <!--   
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onSeajbh">
            Search All
        </c-button>
       </c-col>

       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onSeactr">
            Search
        </c-button>
       </c-col>

        <c-col :span="12">
        <c-button size="small" type="primary"  @click="onSearow">
            Search All
        </c-button>
       </c-col>

        <c-col :span="12">
        <c-button size="small" type="primary"  @click="onDsp">
            Display
        </c-button>
       </c-col>

       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onImgmodNewimg">
            Img
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onImgmodNewhisimg">
            His.img
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onDiaconButdia">
            Diaries
        </c-button>
       </c-col>
                                                    
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onImgmodHisimg">
            Old.img
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onRelrow">
            Release
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onPrinte">
            导出Excel
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onReprow">
            Repair
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onRejrow">
            Reject
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onRelcor">
            Rel Control
        </c-button>
       </c-col>
       -->

    <!--          
       <c-col :span="12">
        <el-form-item label=">>">
            <c-input  v-model="model.orddsp"  placeholder="请输入>>"></c-input>
        </el-form-item>
       </c-col>          
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onExi">
            Exit
        </c-button>
       </c-col> -->
    <!--<p>{{model.trncorco.trnstm}}</p>-->
    <!-- <el-row>
      <c-istream-table
        :list="stmData.data"
        :columns="stmData.columns"
        :showSelection="true"
        v-on:multipleSelect="multipleSelect"
      > -->
    <el-row>
      <c-col :span="24">
        <c-istream-table :list="stmData.data" :columns="stmData.columns">
          <el-table-column
            fixed="right"
            prop="display"
            label="操作"
            width="200px"
          >
          <template slot="header">
              <c-col :span="11" style="text-align:left"><span>操作</span></c-col>
              <c-col :span="12" style="text-align:right"><c-button icon="el-icon-s-tools"></c-button></c-col>
            </template>
            <template>
              <!--              <a :href="`/#/display/${scope.row['10'].toLowerCase()}?trn=${scope.row['1']}`" target="_blank" >显示快照</a>-->
              <!-- <a href="javascript:void(0)" @click="display(scope.$index, scope.row)"
              >显示快照</a
            > -->

              <c-button style="margin-left: 0" size="small" >
                详情
              </c-button>
              <!--
              <c-button style="margin-left: 0" size="small" type="primary">
                快照
              </c-button>
              -->
              <c-button style="margin-left: 0" size="small" >
                冲正
              </c-button>
            </template>
          </el-table-column>
        </c-istream-table>
      </c-col>
    </el-row>
    <!-- <el-row style="margin-top: 2rem">
      <c-col :span="23">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>交易状态信息 —— {{ transactionStatus.busiNo }}</span>
          </div>
          <div class="text item">
            <form class="el-form--label-left el-form--inline">
              <div class="el-form-item">
                <label class="el-form-item__label">修改次数:</label>
                <div class="el-form-item__content">
                  <span>{{ transactionStatus.modTimes }}</span>
                </div>
              </div>
              <div class="el-form-item">
                <label class="el-form-item__label transstatus">交单次数:</label>
                <div class="el-form-item__content">
                  <span>{{ transactionStatus.postCount }}</span>
                </div>
              </div>
              <div class="el-form-item">
                <label class="el-form-item__label transstatus">付款次数:</label>
                <div class="el-form-item__content">
                  <span>{{ transactionStatus.earnCount }}</span>
                </div>
              </div>
              <div class="el-form-item">
                <label class="el-form-item__label transstatus">付款金额:</label>
                <div class="el-form-item__content">
                  <span>{{ transactionStatus.earnAmt }} CNY</span>
                </div>
              </div>
            </form>
          </div>
        </el-card>
      </c-col>
    </el-row> -->
    <!-- <el-dialog :visible.sync="initdialog" :title="'交易列表'" append-to-body>
          <div class="m-list-btns">
          </div>
    </el-dialog> -->
  </div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Trnrel/Event";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [CommonProcess],
  components: {},
  data() {
    return {
      initdialog: false,
      transactionStatus: {
        busiNo: "",
        modTimes: 0,
        postCount: 0,
        accCount: 0,
        earnCount: 0,
        earnAmt: 0,
      },
      stmData: {
        // columns: [
        //   '10 1 "TRN" 50 1 tdViewTypeEdit:0 3 ATPTXT',
        //   '11 2:1 "Own Reference" 112',
        //   '17 2:2 "Addtional Text" 112',
        //   '12 3 "Cur" 37',
        //   '13 4 "Relevant Amount" 101 2 8:1 2 5',
        //   '14 5 "Entry" 104 20 DateTime 1',
        //   '9 6:1 "Req" 39',
        //   '2 6:2 "Sig" 35',
        //   '6 8:1 "Rq0" 40',
        //   '3 8:2 "Rel0" 40',
        //   '7 9:1 "Rq1" 40',
        //   '4 9:2 "Rel1" 40',
        //   '8 10:1 "Rq2" 40',
        //   '5 10:2 "Rel2" 40',
        //   '15 13 "Branch" 142',
        //   '16 11:1 "User" 62',
        //   '18 11:2 "" 62',
        //   '0 12 "Status" 54 1 tdViewTypeEdit:0 1 RELSTA',
        // ],
        columns: [
          '10 1 "交易代码" 80',
          '11 2 "业务编号" 170',
          '12 3 "币种" 70',
          '13 4 "金额" 100',
          '14 5 "创建时间" 170',
          '9 6 "签名要求" 70',
          '2 7 "签名状态" 70',
          '16 8 "经办柜员" 70',
          '0 9 "业务状态" 70',
          '15 10 "业务机构" 200',
        ],
        data: [],
      },
      relrowDisabled: true,
      relflgCodes: [],
      // multipleSelection: [],
    };
  },
  methods: {
    // multipleSelect(val) {
    //   // TODO 根据Status判断按钮是否禁用
    //   this.relrowDisabled = !(val.length > 0);
    //   this.multipleSelection = val;
    // },
    // getSelectedData() {
    //   return this.multipleSelection.map((idx) => this.stmData.data[idx]);
    // },
    ...Event,
  },
  created: function () {},
  mounted() {
    this.relflgCodes = [
      { label: "ALL", value: "1" },     //已完成列表业务状态All
      { label: "Final", value: "F" },
      { label: "Released", value: "R" },
    ];
  },
  computed: {},
};
</script>
<style>
</style>
