<template>
  <div class="eibs-tab">

      <c-row>      
       <c-col :span="12">
        <el-form-item label="Fee Code" prop="selfee.cod">
            <c-input  v-model="model.selfee.cod" maxlength="6"  placeholder="请输入Fee Code"></c-input>
        </el-form-item>
       </c-col>
      

       <c-col :span="12">
        <el-form-item label="Fee Text" prop="feecod">
            <c-input  v-model="model.feecod" maxlength="6"  placeholder="请输入Fee Text"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="24">
       <c-col :span="12">
        <el-form-item label="Condition" prop="feepri">
            <c-select v-model="model.feepri" style="width:100%" placeholder="请选择Condition" @change="feepriChange">
                <el-option
                        v-for="item in codes.feepri"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
            </c-select>
        </el-form-item>
       </c-col>
    </c-col>


     <c-col :span="12" v-if="secFlag">
        <el-form-item  label="Sector" prop="buscod" >
            <c-select v-model="model.buscod" id="buscod" style="width:100%"  placeholder="请选择Bus.Sector Code">
              <el-option
                        v-for="item in codes.sector"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
              </c-select>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="secFlag">
        <el-form-item id="BusinessSec" label="Business Sec" prop="namlab" >
            <c-input  type="text"  v-model="model.namlab" maxlength="6" ></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="entFlag">
        <el-form-item label="Entity" prop="typlab">
            <c-input  v-model="model.typlab" maxlength="8"  placeholder="请输入Entity"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="entFlag">
        <el-form-item label="Entity Name" prop="namlab">
            <c-input  v-model="model.namlab" maxlength="40"  placeholder="请输入Entity Name"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="regFlag">
        <el-form-item label="Region" prop="regcod">
             <c-select v-model="model.regcod" style="width:100%" placeholder="请选择Region">
              <el-option
                        v-for="item in codes.region"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
              </c-select>
       
       </el-form-item>
       </c-col>

      <c-col :span="12" v-if="regFlag">
        <el-form-item label="Region Name" prop="recpan.namlab">
            <c-input  type="text" v-model="model.namlab" maxlength="6" ></c-input>
        </el-form-item>
       </c-col>

    <c-col :span="12" v-if="couFlag">
        <el-form-item label="Country" prop="ctycod">
            <c-select v-model="model.ctycod" style="width:100%" placeholder="请选择Country">
              <el-option
                        v-for="item in codes.bopcty"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
              </c-select>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="couFlag">
        <el-form-item label="Country Name" prop="ctycod">
            <c-input  type="text" v-model="model.ctycod" maxlength="6" ></c-input>
        </el-form-item>
       </c-col>


    <c-col :span="12" v-if="maFlag">
        <el-form-item label="Main Party" prop="typlab">
            <c-input  v-model="modeltyplab" maxlength="8"  placeholder="请输入Main Party"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="maFlag">
        <el-form-item label="Group Name" prop="namlab">
            <c-input  v-model="model.namlab" maxlength="40"  placeholder="请输入Group Name"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="parFlag">
        <el-form-item label="Party" prop="recpan.ety.extkey">
            <c-input  v-model="model.recpan.ety.extkey" maxlength="8"  placeholder="请输入Party"></c-input>
        </el-form-item>
       </c-col>

        <c-col :span="12" v-if="parFlag">
        <el-form-item label="Party Name" prop="namlab">
            <c-input  v-model="model.namlab" maxlength="40"  placeholder="请输入Party Name"></c-input>
        </el-form-item>
       </c-col>
    </c-row>

       <c-row>
       <c-col :span="24">  
          <div style="margin-top:20px;">
            <c-button size="small" type="primary"  @click="onInfbutSearow">
                Search
            </c-button>
            <c-button size="small" type="primary"  @click="onInfbutDsp">
                Display
            </c-button>
            <c-button size="small" type="primary"  @click="onInfbutUserow">
                Use
            </c-button>
            <c-button size="small" type="primary"  @click="onInfbutClr">
                Clear
            </c-button>
             <c-button size="small" type="primary"  @click="onInfbutButprt">
                导Excel
            </c-button>
        </div> 
        </c-col>   
       </c-row>
       <el-row>
      <c-istream-table :list="stmData.data" :columns="stmData.columns" :id="table">
            </c-istream-table>
      </el-row>                
                     
        
  </div>
</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Inffec/Event"

export default {
    inject: ['root'],
    props: ["model", "codes"],
    mixins: [CommonProcess],
    data(){
        return {
            secFlag:false,
            entFlag:false,
            regFlag:false,
            couFlag:false,
            maFlag:false,
            parFlag:false,

            stmData: {
                columns: [
                    "11 1 \"fee\" 150 ",
                    "99 1 \"Description\" 150",
                    "1 2 \"Cond\" 150",
                    "2 3 \"Cur\" 150",
                    "3 4 \"Low Amt\" 150",
                    "4 5 \"High Amount\" 150 1 tdViewTypeEdit:0 1 SPT:STA",
                    "5 6 \"Beg Dat\" 150",
                    "6 7 \"End Dat\" 150",
                    "99 8 \"Calculation Rule\" 150 1 tdViewTypeEdit:0 1 SPT:STA",
                    "8 9 \"Fix-Amt\" 150",
                    "9 10 \"Rate\" 150",
                ],
                data: [
                ]
            }
        }
        
    },
    methods:{...Event,
     feepriChange(selectValue){
           if (selectValue == "$") {
                this.secFlag = true;
            } else {
                this.secFlag = false;
            }
            if (selectValue == "3") {
                this.maFlag = true;
            } else {
                this.maFlag = false;
            }
            if (selectValue == "*") {
                this.entFlag = true;
            } else {
                this.entFlag = false;
            }
            if (selectValue == "4") {
                this.parFlag = true;
            } else {
                this.parFlag = false;
            }
            if (selectValue == "1") {
                this.regFlag = true;
            } else {
                this.regFlag = false;
            }
            if (selectValue == "2") {
                this.couFlag = true;
            } else {
                this.couFlag = false;
            }
        },
    
    
    },

    created:function(){

    },




}
</script>
<style>

</style>
