<template>
  <div class="flexOne page_PlatformAccount">
    <div class="query-box">

      <ul>
        <li v-if="isExamine" style="margin-bottom: 10px;">
          <span>
            <em>{{$t('fnc.shzhuangtai')}}</em>
            <el-select v-model="msg.QAccountState" class="w200 HworkInput"
            @change="msg.pageIndex==1,getList()">
              <el-option v-for="item in QAccountStateList" :key="item.Id" :label="item.Name" :value="item.Id"></el-option>
            </el-select>
          </span>
        </li>
        <li>
          <input type="button" class="normalBtn" :value="$t('pub.addBtn')"
            @click="addShow=true,text=$t('pub.addBtn'),ed=false,isLookPlatformAccountPwd=true">
          <input type="button" class="normalBtn" @click="downMuban()" :value="$t('visa.v_daochu')">
        </li>
      </ul>
    </div>
    <v-table v-if="isReady" is-horizontal-resize column-width-drag style="width:100%" :columns="columns"
      :table-data="DataList" :filter-method="filterMethod" :total="total" :pageSize="msg.pageSize"
      :pageIndex="msg.pageIndex" :handleCurrentChange="handleCurrentChanges" :multiple-sort="multipleSort"
      :is-loading="loading" sort-always @sort-change="sortChange" @on-custom-comp='customCompFunc'
      :row-click="rowClick"></v-table>
    <div class="_vMG_edit _scrollbar" v-if="addShow" :class="addShow==true?'edHeight':''">
      <el-row>
        <el-col :span="20">
          <p class="_tit">{{text}}{{$t('fnc.acc')}}</p>
        </el-col>
        <el-col :span="4" class="_add_saveBtn">
          <button v-if="examineLoading" type="button" class="normalBtn" @click="examineInstitutions(1)">{{$t('visa.v_tongguo')}}</button>
          <button v-if="examineLoading" type="button" class="normalBtn" @click="examineInstitutions(2)">{{$t('fnc.bohui')}}</button>
          <button v-if="examineLoading==false&&isExamine==false" type="button" class="normalBtn" @click="submitForm('addMsg',1)">{{$t('pub.saveBtn')}}</button>
          <button class="hollowFixedBtn" type="button"
            @click="cancelEdit(),resetForm('addMsg'),addShow=false">{{$t('pub.cancelBtn')}}</button>
        </el-col>
      </el-row>
      <el-form class="_info_box clearfix" :model="addMsg" ref="addMsg" :rules="rules" label-width="130px">
        <el-row>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.accBming')" prop="Alias">
              <el-input v-model="addMsg.Alias" maxlength="50"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.accType')" prop="TypeId">
              <el-select filterable v-model="addMsg.TypeId" class>
                <el-option v-for="item in AccountTypeList" :label="item.Name" :value="item.ID" :key="item.ID">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.ptjigou')" prop="BackId">
              <el-select filterable v-model="addMsg.BackId" class>
                <el-option v-for="item in FinancialList" v-if="item.Type == 1" :label="item.Name" :value="item.ID"
                  :key="item.ID"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.khuren')" prop="Accountholder">
              <el-input v-model="addMsg.Accountholder" maxlength="20"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.ptAcc')" prop="PlatformNo">
              <el-input v-model="addMsg.PlatformNo" maxlength="20"></el-input>
            </el-form-item>
          </el-col>
            <el-col :span="4" :gutter="35" v-if="isLookPlatformAccountPwd">
              <el-form-item :label="$t('objFill.pingtaimima')" prop="PlatFormPwd">
                <el-input v-model="addMsg.PlatFormPwd" class></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="4" :gutter="35">
              <el-form-item :label="$t('objFill.pingtaiwangzhi')" prop="PlatFormUrl">
                <el-input v-model="addMsg.PlatFormUrl" class></el-input>
              </el-form-item>
            </el-col>

          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('objFill.baozhengjdh')" prop="FinanceNo">
              <el-input v-model="addMsg.FinanceNo" maxlength="50"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8" :gutter="35">
            <el-form-item :label="$t('objFill.hetongfujian')" prop="ContractArray">
              <div style="display: flex;flex-wrap: wrap;">
                <div>
                  <div class="_info_img" v-if="addMsg.ContractArray&&addMsg.ContractArray.length>0">
                    <ul class="clearfix">
                    <li v-for="(img,imgI) in addMsg.ContractArray"
                    style="margin-right: 5px;position: relative;
                    border:1px dashed #d1d1d1;border-radius: 6px;">
                    <img v-if="!img" src="../../../assets/img/Travelslider.png" alt="">
                      <el-image
                      style="width: 50px;height: 50px;"
                      v-if="img&&verificationFile(img,3)"
                      :src="img"
                      :preview-src-list="[img]">
                    </el-image>
                      <div v-if="img&&verificationFile(img,1)"
                        style="width: 50px; line-height: 50px;text-align: center;">
                        <span class="_wenjian_P iconfont"
                          :class="img.substring(img.lastIndexOf('.')+1,img.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"></span>
                      </div>
                      <span class="iconfont icon-guanbi1"
                      @click="deleteUploadFile(imgI)"></span>
                      <div v-if="img&&verificationFile(img,1)" class="_see_img"
                      @click="verificationFile(img,3)?'':showUpLoadFile2(img)">
                        <i class="iconfont icon-sousuo"></i>
                      </div>
                    </li>
                    </ul>
                  </div>
                </div>
                <div style="display: flex; justify-content: end;">
                  <el-upload class="upload-demo"
                  ref="my-upload"
                    style="display:inline-block;position:relative;top:-1px;left:3px;"
                    :http-request="uploadImg1New"
                    :show-file-list="false" action="">
                    <el-button size="small" type="primary">{{$t('sm.shangchaunht')}}</el-button>
                </el-upload>
                </div>
              </div>
              <!--
              <el-upload class="avatar-uploader" action="" :http-request="uploadImg1New"
                accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false">
                <img v-if="ContractUrl" :src="ContractUrl" class="avatar">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>  -->
            </el-form-item>
          </el-col>

          <el-col :span="8" :gutter="35">
            <el-form-item :label="$t('objFill.jiekuansifs')" prop="SettlementInfo">
              <el-input v-model="addMsg.SettlementInfo"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item :label="$t('objFill.hetongshijian')">
              <el-date-picker v-model="addMsg.ContractStartDateInfo"
              style="width: 100%;"
              type="datetimerange" :start-placeholder="$t('OrderList.star')"
                :end-placeholder="$t('OrderList.end')" size="small" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.ptsyongfei')" prop="Royalty">
              <el-input v-model="addMsg.Royalty" maxlength="20"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.ptsffangshi')">
              <el-select multiple v-model="SettlementType" @change="addMsg.SettlementType=SettlementType.join(',')">
                <el-option :label="$t('fnc.abfenbi')" value=1></el-option>
                <el-option :label="$t('fnc.anrentou')" value=2></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35" v-if="addMsg.SettlementType&&addMsg.SettlementType.indexOf('2')!=-1">
            <el-form-item :label="$t('fnc.ptsxufei')" prop="CommissionPeople">
              <el-input v-model="addMsg.CommissionPeople" maxlength="20">
                <template slot="append">/{{$t('hotel.hotel_people')}}</template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35" v-if="addMsg.SettlementType&&addMsg.SettlementType.indexOf('1')!=-1">
            <el-form-item :label="$t('fnc.ptsxufei')" prop="Commission">
              <el-input v-model="addMsg.Commission" maxlength="20">
                <template slot="append">%</template>
              </el-input>
            </el-form-item>
          </el-col>
          <!--
            <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.ptsxufei')" prop="Commission">
              <el-input v-model="addMsg.Commission" maxlength="20">
                <template slot="append">{{addMsg.SettlementType==1?'%':'/人'}}</template>
              </el-input>
            </el-form-item>
          </el-col>
           -->
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.bzengjin')" prop="Bond">
              <el-input v-model="addMsg.Bond" maxlength="20"></el-input>
            </el-form-item>
          </el-col>
          <!-- <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.hetong')">
              <el-select filterable v-model="addMsg.HaveContract" class>
                <el-option :label="$t('fnc.yhetong')" value=1></el-option>
                <el-option :label="$t('fnc.whetong')" value=0></el-option>
              </el-select>
            </el-form-item>
          </el-col> -->
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.htshuoming')">
              <el-input v-model="addMsg.ContraceDateRange" class></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <!-- v-if="ed==true" -->
            <el-form-item :label="$t('fnc.csyue')" prop="Initialbalance">
              <el-input v-model="addMsg.Initialbalance" class></el-input>
            </el-form-item>
            <!-- <el-form-item label="初始余额：" prop="Initialbalance" v-else>
                                    <el-input v-model="addMsg.Initialbalance" class="" placeholder="保存后不可修改"></el-input>
            </el-form-item>-->
          </el-col>

          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.zhbizhong')" prop="CurrencyId">
              <el-select filterable v-model="addMsg.CurrencyId" class>
                <el-option v-for="item in financeinfoList" :label="item.Name" :value="item.ID" :key="item.ID">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35" class="_BranchIdS">
            <el-form-item :label="$t('fnc.ssgongsi')" prop="BranchIdS">
              <el-select filterable v-model="addMsg.BranchIdS" collapse-tags>
                <el-option v-for="item in CompanyList" :label="item.BName" :value="item.Id" :key="item.Id"
                  :disabled="item.disabled"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('system.table_ssLine')">
              <el-select filterable multiple v-model="LineId" collapse-tags
              @change="getLineId">
                <el-option :label="$t('pub.unlimitedSel')" value="-1"
                :disabled="LineIDdisabled"></el-option>
                <el-option v-for="item in LineList"
                :label="item.LineName"
                :value="item.LineID" :key="item.LineID"
                :disabled="item.disabled"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.fxshangxian')" prop="RiskLimitMoney">
              <el-input v-model="addMsg.RiskLimitMoney" type="number"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.fxxiaxian')">
              <el-input v-model="addMsg.RiskLowerLimitMoney" min="0" type="number"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.bdyhzhanghu')" prop="BindBankID">
              <el-select v-model="addMsg.BindBankID" filterable remote :placeholder="$t('fnc.qsryhzhgjc')"
                :remote-method="remoteQueryBankMethod" :loading="remoteLoading" class="minmargin-box">
                <el-option v-for="item in bankList" :key="item.ID" :label="item.Alias" :value="item.ID">
                  <span style="float: left">{{ item.Alias }}</span>
                  <span class="right-tag">{{ item.BranchName }}</span>
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('objFill.chuhshibwbje')">
              <el-input v-model="addMsg.AccountStartWBMoney" type="number" class></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('objFill.chuhshiybje')">
              <el-input v-model="addMsg.AccountStartMoney" type="number" class></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('objFill.qichuyyrqi')">
              <el-date-picker type="date" v-model="addMsg.BeginTimeStr" value-format="yyyy-MM-dd"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item label="提现回团天数">
              <el-input v-model="addMsg.WithdrawDays" type="number" class></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24" :gutter="35">
            <el-form-item :label="$t('fnc.beizhu')">
              <el-input type='textarea' v-model="addMsg.Remark" class></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div class="_vMG_edit _scrollbar" v-if="addCuren == false" :class="addCuren==false?'edHeight_t':''">
      <el-row>
        <el-col :span="20">
          <p class="_tit">{{$t('fnc.qmtiaohui')}}</p>
        </el-col>
        <el-col :span="4" class="_add_saveBtn">
          <button type="button" class="normalBtn"
            @click="submitForm('SetProfitLossMsg',2)">{{$t('fnc.qrtijiao')}}</button>
          <button class="hollowFixedBtn" type="button"
            @click="cancelEdit(),resetForm('SetProfitLossMsg')">{{$t('pub.cancelBtn')}}</button>
        </el-col>
      </el-row>
      <el-form class="_info_box clearfix" :model="SetProfitLossMsg" ref="SetProfitLossMsg" :rules="rules"
        label-width="100px">
        <el-row>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.sqhuilv')">
              <el-input v-model="SetProfitLossMsg.initRate" disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.qmhuilv')" prop="EndRate">
              <el-input v-model="SetProfitLossMsg.EndRate" type="number" @change="Calculation()"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35">
            <el-form-item :label="$t('fnc.xzqishu')" prop="TermNum">
              <el-date-picker v-model="SetProfitLossMsg.TermNum" value-format="yyyy-MM-dd" type="month" class="_wAuto"
                :placeholder="$t('admin.admin_choDate')"></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35" v-if="costType.length">
            <el-form-item :label="$t('fnc.fyleixing')" prop="CostTypeID">
              <el-select filterable v-model="SetProfitLossMsg.CostTypeID">
                <el-option v-for="item in costType" :label="item.Name" :value="item.ID" :key="item.ID"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="4" :gutter="35" class="_yingkui">
            <p v-if="moneyDate.ProfitLoss<0">
              {{$t('fnc.yingkui')}}
              <span class="fc_red">{{moneyDate.ProfitLoss}}</span>
            </p>
            <p v-if="moneyDate.ProfitLoss>0">
              {{$t('fnc.yingli')}}
              <span class="fc_green">{{moneyDate.ProfitLoss}}</span>
            </p>
            <p v-if="moneyDate.ProfitLoss==0">
              {{$t('fnc.yingkui')}}
              <span class="fc_green">0</span>
            </p>
          </el-col>
        </el-row>
      </el-form>
    </div>

    <el-dialog custom-class='w400' title="修改回团几天后可提现" :visible.sync="DaysShow" center>
        <template>
          <el-form label-width="100px">
            <el-form-item label="类型">              
              <el-select v-model="DaysMsg.WithdrawType" placeholder="请选择">
                <el-option key="0" label="回团后" value="0"></el-option>
                <el-option key="1" label="出团后" value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="推后天数">
              <el-input v-model="DaysMsg.WithdrawDays" class="w200"></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <button class="hollowFixedBtn" @click="DaysShow=false">{{$t('pub.cancelBtn')}}</button>
            <button class="normalBtn" type="primary" @click="setWithdrawDays">{{$t('pub.sureBtn')}}</button>
          </div>
        </template>
      </el-dialog>
  </div>
</template>
<script>
  import Vue from 'vue'
  export default {
    props:['pagesTitle'],
    data() {
      return {
        QAccountStateList:[
          {Name:this.$t('advmanager.v_all'),Id:-1},
          {Name:this.$t('objFill.dsh'),Id:0},
          {Name:this.$t('fnc.a_yshenhe'),Id:1},
          {Name:this.$t('salesModule.HasRefused'),Id:2},
        ],
        isLookPlatformAccountPwd: false,//账户密码权限
        isExamine: false,
        columns: [],
        remoteLoading: false,
        total: 0,
        tableData: [],
        bankList: [],
        isReady: false,
        multipleSort: false,
        loading: true,
        CompanySelect: [],
        ContractUrl: "",
        examineLoading: false,
        ExamineMsg:{
          ID:0,
          AccountState:0
        },
        msg: {
          pageIndex: 1,
          pageSize: 15,
          BackId: "-1",
          TypeId: "-1",
          RB_Branch_Id: "-1",
          Alias: "",
          OrderBy: "Initialbalance desc",
          SettlementType: 0,
          HaveContract: -1,
          SigningLine: "",
          Accountholder: "",
          QAccountState: 0,//0-待审核，1-已审核，2-已拒绝  -1全部
        },
        LineId: [-1],
        SettlementType: ['1'],
        addMsg: {
          ID: 0,
          Alias: "",
          TypeId: "",
          BackId: "",
          Accountholder: "",
          PlatformNo: "",
          CommissionPeople: "",
          Commission: "",
          Initialbalance: "",
          CurrencyId: "",
          RiskLimitMoney: "",
          BranchList: [],
          BranchIdS: 0,
          OutCharge: 0,
          InCharge: 0,
          RiskLowerLimitMoney: "",
          SettlementType: '1',
          Royalty: 0,
          Bond: 0,
          SigningLine: '-1',
          Remark: '',
          BindBankID: null,
          HaveContract: '0',
          ContraceDateRange: '',
          AccountStartMoney: 0,
          AccountStartWBMoney: 0,
          BeginTimeStr: '',
          PlatFormPwd: "",
          PlatFormUrl: "",
          ContractStartDateStr: '',
          ContractEndDateStr: "",
          ContractStartDateInfo: [],
          FinanceNo: "",
          ContractArray: [],
          ContractUrl: "",
          SettlementDate: "",
          SettlementInfo: "",
          WithdrawDays:0,
          WithdrawType:0,
        },
        getCompanyMsg: {
          RB_Group_Id: "0",
          Status: "0"
        },
        DataList: [],
        total: 0,
        currentPage: 1,
        loading: true,
        text: "",
        dialogTitle: "",
        AccountTypeList: [],
        CompanyList: [],
        FinancialList: [],
        financeinfoList: [],
        addShow: false,
        noData: false,
        inTime: 15,
        ed: false,
        InitTimeFun: "",
        rules: {
          //表单必填验证
          Alias: [{
            required: true,
            message: this.$t('rule.qsrzhbieming'),
            trigger: "blur"
          }],
          TypeId: [{
            required: true,
            message: this.$t('rule.qxzzhleixing'),
            trigger: "change"
          }],
          BackId: [{
            required: true,
            message: this.$t('rule.qxzyhjigou'),
            trigger: "change"
          }],
          Accountholder: [{
            required: true,
            message: this.$t('rule.qsrkhuren'),
            trigger: "blur"
          }],
          PlatformNo: [{
            required: true,
            message: this.$t('rule.qsrptzhanghao'),
            trigger: "blur"
          }],
          Commission: [{
              required: true,
              message: this.$t('rule.qsrptsxufei'),
              trigger: "blur"
            },
            {
              pattern: this.$commonUtils.Regex.el_IsdecimalTrr,
              message: this.$t('rule.qsrzqxufei')
            }
          ],
          BranchIdS: [{
            required: true,
            message: this.$t('rule.qszssgongsi'),
            trigger: "change"
          }],
          CurrencyId: [{
            required: true,
            message: this.$t('rule.qxzzhbizhong'),
            trigger: "change"
          }],
          Initialbalance: [{
              required: true,
              message: this.$t('rule.qsrcsyue'),
              trigger: "blur"
            },
            {
              pattern: this.$commonUtils.Regex.el_IsInventer,
              message: this.$t('rule.qsrzqdyue')
            }
          ],
          OutCharge: [{
            required: true,
            message: this.$t('rule.szfzeren'),
            trigger: "change"
          }],
          InCharge: [{
            required: true,
            message: this.$t('rule.fkfzeren'),
            trigger: "change"
          }],
          CostTypeID: [{
            required: true,
            message: this.$t('rule.qxzfyleixing'),
            trigger: "change"
          }],
          Royalty: [{
            required: true,
            message: this.$t('rule.qtxptsyongfei'),
            trigger: "change"
          }],
          Bond: [{
            required: true,
            message: this.$t('rule.qtxptbzhengjin'),
            trigger: "change"
          }],
          BindBankID: [{
            required: true,
            message: this.$t('rule.qxzbdyinhang'),
            trigger: "change"
          }],
          RiskLimitMoney: [{
            required: true,
            message: this.$t('objFill.qingshurufxsx'),
            trigger: "blur"
          }]
        },
        addCuren: true,
        ed: false,
        loading2: false,
        moneyDate: {
          Money: 0,
          LastR: 0,
          currentR: 0,
          LastM: 0,
          currentM: 0,
          ProfitLoss: 0
        },
        EmployeeMsg: {
          GroupId: "",
          BranchId: -1,
          DepartmentId: 0,
          PostId: 0,
          IsLeave: 0
        },
        showEmployeeList: [],
        showEmployeeList2: [],
        Charge: 3,
        SetProfitLossMsg: {
          ID: 0,
          AccountID: 0,
          EndRate: "",
          TermNum: "",
          CurrencyId: "",
          initRate: "",
          Money: "",
          ProfitLoss: 0,
          Source: 2,
          CostTypeID: ""
        },
        costType: [],
        LineList: [],
        LineIDdisabled: false,
        DaysShow: false,
        DaysMsg:{
          AccountId:0,
          WithdrawDays:0,
          WithdrawType:'0',
        }
      };
    },
    methods: {
      getLineId(){
        let data = this.LineId.join(',')
        this.addMsg.SigningLine = data
        if(this.LineId.length>1&&data.indexOf('-1')!=-1){
          this.LineId.forEach((x,index)=>{
            if(x==-1){
              this.LineId.splice(index,1)
            }
          })
          this.LineIDdisabled = true
        }
        if(this.LineId.length==0){
          this.LineIDdisabled = false
        }
        this.$forceUpdate()
      },
      // 线路
      getLineList() {
        this.apipost("line_post_GetAllList_V2", {
          LineDirection: 0
        }, (res) => {
          if (res.data.resultCode == 1) {
            this.LineList = res.data.data;
            // let arr = function(list){
            //   list.forEach(x=>{
            //     x.disabled = true
            //   })
            // }
          }
        });
      },
      showUpLoadFile2(i) { // 预览上传文件
        if (i.substring(i.lastIndexOf('.') + 1, i.length).toUpperCase() == 'PDF') {
          this.previewPDF(i)
        } else {
          window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i)
        }
      },
      rowClick(rowIndex, rowData, column) {
        let path = 'PlatformAccDetail';
        if (column.title == this.$t('fnc.zhyue')) {
          this.$router.push({
            name: path,
            query: {
              TypeId: rowData.TypeId,
              ID: rowData.ID,
              blank: "y",
            }
          });
        }
      },
      remoteQueryBankMethod(query) {
        if (query != '') {
          this.remoteLoading = true
          this.apipost('bankbase_get_searchbyalias', {
            query
          }, x => {
            this.remoteLoading = false
            this.bankList = x.data.data
          })
        }
      },
      customCompFunc(params) {
        if (params.type === 'delete') {
          this.financeinfoRemove(params.id, params.alias)
        } else if (params.type === 'edit') {
          this.editCurency(params.id)
          this.text = this.$t('pub.updateMsg')
          this.addShow = true
          this.addCuren = true
        }else if (params.type === 'examine') {
          this.editCurency(params.id)
          this.text = this.$t('fnc.shenhe')
          this.addShow = true
          this.examineLoading=true
          this.ExamineMsg = {ID:params.id,AccountState:0};
          this.addCuren = true
        }
        else if(params.type === 'days'){
          this.DaysMsg.AccountId = params.id;
          this.DaysMsg.WithdrawDays = params.WithdrawDays;
          this.DaysMsg.WithdrawType = params.WithdrawType.toString();

          this.DaysShow = true;
        }
      },
      initColums() {
        this.isReady = false;
        let that = this;
        let Alias = {
          title: that.$t('fnc.acc'),
          field: "Alias",
          width: 80,
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          result: "",
          filterMultiple: false,
          filters: [{}],
          type: "text"
        };
        // let companyList = [];
        this.CompanyList.forEach(x => {
          let item = {};
          item.label = x.BName;
          item.value = x.Id;
          this.CompanySelect.push(item);
        });
        let allName = {
          field: "allName",
          title: that.$t('system.query_company'),
          width: 40,
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          filterMultiple: false,
          filters: this.CompanySelect,
          result: "",
          type: "select",
          // isFrozen:true
        };
        let Accountholder = {
          field: "Accountholder",
          title: that.$t('fnc.khuren'),
          width: 80,
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          result: "",
          filterMultiple: false,
          filters: [{}],
          type: "text"
        };
        let benBalance = {
          field: "Initialbalance",
          title: that.$t('fnc.zhyue'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          orderBy: "desc",
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            if (rowData["Initialbalance"] >= rowData["RiskLimitMoney"] && rowData["Initialbalance"] != 0) {
              let text = that.$t('fnc.chaoxian')
              return `<span style='color:red;font-weight:bold'>${rowData["Initialbalance"].toFixed(2)}</span><span style='color:red;margin-left:12px;'>${text}</span>`;
            } else {
              return rowData["Initialbalance"].toFixed(2)
            }
          }
        };
        let Commission = {
          field: "Commission",
          title: that.$t('fnc.ptjyifei'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            let text = that.$t('hotel.hotel_people')
            let commissionStr="";
            if (rowData.SettlementType=="1") {
              commissionStr=  rowData.Commission.toFixed(2) + "%" ;
            }else  if (rowData.SettlementType=="2") {
              commissionStr=   rowData.Commission + "/" + text ;
            }
            else{
              commissionStr=  rowData.Commission.toFixed(2) + "%"+'&nbsp;&nbsp;&nbsp;&nbsp;' + rowData.Commission + "/" + text ;
            }
            return commissionStr;
          },

          filterMultiple: true,
          result: [],
          filters: [{
              label: that.$t('fnc.jyebfenbi'),
              value: "1"
            },
            {
              label: that.$t('fnc.jyrtoushu'),
              value: "2"
            }
          ],
          type: "check"
        };
        let Royalty = {
          field: "Royalty",
          title: that.$t('fnc.ptsyongfei'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          orderBy: "",
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            return rowData.Royalty.toFixed(2);
          }
        };
        let contract = {
          title: that.$t('fnc.hetong'),
          field: "HaveContract",
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            let whetong = that.$t('fnc.whetong')
            let yhetong = that.$t('fnc.yhetong')
            return `<span style='color:${
            rowData.HaveContract == 0 ? "red" : "blue"
          };margin-right:12px;'>${
            rowData.HaveContract == 0 ? whetong : yhetong
          }</span><span>${
            rowData.ContraceDateRange ? rowData.ContraceDateRange : ""
          }</span>`;
          },
          filterMultiple: true,
          result: [],
          filters: [{
              label: that.$t('fnc.whetong'),
              value: "1"
            },
            {
              label: that.$t('fnc.whetong'),
              value: "0"
            }
          ],
          type: "check"
        };
        let signingLine = {
          field: "LineList",
          title: that.$t('fnc.qyluxian'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          result: "",
          filterMultiple: false,
          filters: [{}],
          type: "text"
        };
        let bindBank = {
          field: "BindBankName",
          title: that.$t('fnc.bdyinhang'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80
        };
        let accountState = {
          field: "AccountState",
          title: this.$t('hotel.hotel_status'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 40,
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            let accountStateStr="";
            if(rowData.AccountState==0){accountStateStr=that.$t('objFill.dsh')}
            else if(rowData.AccountState==1){accountStateStr=that.$t('pub.normalSel')}
            else if(rowData.AccountState==2){accountStateStr=that.$t('objFill.yibohui')}
            else{accountStateStr=""}
            return accountStateStr;
          },
        };
        let remark = {
          field: "Remark",
          title: that.$t('hotel.hotel_remark'),
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 80,
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            return `<span style='color:gray'>${rowData.Remark?rowData.Remark:''}</span>`;
          },
        };
        let withdrawDays = {
          field: "WithdrawDays",
          title: "提现标识",
          titleAlign: "left",
          columnAlign: "left",
          isResize: true,
          width: 20,
          formatter: function (rowData, rowIndex, pagingIndex, field) {
            let accountStateStr="";
            if(rowData.WithdrawDays==0){accountStateStr="-"}
            else{accountStateStr=rowData.WithdrawDays}
            if(rowData.WithdrawType==0){accountStateStr+=' [回团后]'}
            else{accountStateStr+=' [出团后]'}
            return accountStateStr;
          },
        };
        let opera = {
          title: that.$t('hotel.table_operat'),
          titleAlign: "left",
          columnAlign: "left",
          width: 120,
          isResize: false,
          componentName: 'table-operation'
        };
        this.columns = [];
        this.columns.push(Alias);
        this.columns.push(allName);
        this.columns.push(Accountholder);
        this.columns.push(benBalance);
        this.columns.push(Commission);
        this.columns.push(Royalty);
        this.columns.push(contract);
        this.columns.push(signingLine);
        this.columns.push(bindBank);
        this.columns.push(accountState);
        this.columns.push(remark);
        this.columns.push(withdrawDays);
        this.columns.push(opera);
        this.isReady = true;
      },
      handleCurrentChanges(val) {
        this.msg.pageIndex = val;
        this.getList();
      },
      sortChange(param) {
        if (param.Royalty != "") {
          this.msg.OrderBy = `Royalty ${param.Royalty}`;
        } else if (param.Initialbalance != "") {
          this.msg.OrderBy = `Initialbalance ${param.Initialbalance}`;
        }
        this.getList();
      },
      filterMethod(filters) {
        this.msg.Alias = filters.Alias;
        if (filters.allName == '__all__') {
          filters.allName = '-1'
        }
        this.msg.RB_Branch_Id = filters.allName;
        this.msg.SettlementType =
          filters.Commission.length == 1 ? filters.Commission[0] : 0;
        this.msg.HaveContract =
          filters.HaveContract.length == 1 ? filters.HaveContract[0] : -1;
        this.msg.SigningLine = filters.SigningLine;
        this.msg.Accountholder = filters.Accountholder;
        this.msg.pageIndex = 1;
        this.getList();
      },
      regNum(n, t) {
        // 判断数字    n 值 t 类型
        let reg = /^\d+(\.\d{0,6})?$/;
        if (!n) return 0;
        if (t == 2) {
          if (reg.test(n)) {
            return parseFloat(n);
          }
          return 0;
        } else if (t == 1) {
          if (reg.test(n)) {
            return parseFloat(n);
          }
          return 0;
        }
      },
      Calculation() {
        // 计算盈亏
        this.SetProfitLossMsg.CostTypeID = "";
        this.moneyDate.Money = this.regNum(this.SetProfitLossMsg.Money, 1);
        this.moneyDate.LastR = this.regNum(this.SetProfitLossMsg.initRate, 1);
        this.moneyDate.currentR = this.regNum(this.SetProfitLossMsg.EndRate, 2);
        this.moneyDate.LastM = 0;
        this.moneyDate.currentM = 0;
        this.moneyDate.ProfitLoss = (
          (this.moneyDate.currentR - this.moneyDate.LastR) *
          this.moneyDate.Money
        ).toFixed(2);
        if (this.moneyDate.ProfitLoss > 0) {
          this.getTemplateCostTypeList(1);
        } else if (this.moneyDate.ProfitLoss < 0) {
          this.getTemplateCostTypeList(2);
        } else {
          this.costType = [];
        }
      },
      getTemplateCostTypeList(t) {
        this.apipost(
          "financeinfo_post_GetCostTypeList", {
            Type: t
          },
          res => {
            if (res.data.resultCode == 1) {
              this.costType = res.data.data;
            } else {}
          },
          err => {}
        );
      },
      remoteMethod(query) {
        if (query !== "") {
          this.loadingPeople = true;
          this.apipost(
            "admin_Get_Chat_All_SelectEmpName", {
              EmName: query
            },
            res => {
              if (res.data.resultCode == 1) {
                this.showEmployeeList = res.data.data;
              }
              this.loadingPeople = false;
            },
            err => {}
          );
        } else {
          this.showEmployeeList = [];
        }
      },
      remoteMethod2(query) {
        if (query !== "") {
          this.loadingPeople = true;
          this.apipost(
            "admin_Get_Chat_All_SelectEmpName", {
              EmName: query
            },
            res => {
              if (res.data.resultCode == 1) {
                this.showEmployeeList2 = res.data.data;
              }
              this.loadingPeople = false;
            },
            err => {}
          );
        } else {
          this.showEmployeeList2 = [];
        }
      },
      getfinanceinfoList() {
        //获取币种列表
        this.apipost(
          "financeinfo_post_GetList", {
            Name: ""
          },
          res => {
            if (res.data.resultCode == 1) {
              this.financeinfoList = res.data.data;
            } else {}
          },
          err => {}
        );
      },
      getFinancialList() {
        //获取机构列表
        this.apipost(
          "FinancialInstitutions_post_GetList", {
            Type: -1
          },
          res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data.filter(x=> {return x.Type==1})
              this.FinancialList = []
              data.forEach(x=>{
                if(x.ID==2||x.ID==216){
                  this.FinancialList.push(x)
                }
              })
              // this.FinancialList = res.data.data;
            } else {}
          },
          err => {}
        );
      },
      getCompanyList(t, info) {
        if (t) {
          this.CompanyList.push({
            BName: info.BranchName,
            Id: info.RB_Branch_id
          })
          return
        }
        //获取公司列表
        this.apipost(
          "admin_get_BranchGetList",
          this.getCompanyMsg,
          res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach(x => {
                x.disabled = false;
              });
              this.CompanyList = data;
              this.initColums();
            } else {}
          },
          err => {}
        );
      },
      editCurency(id) {
        //  修改根据ID 获取信息
        this.apipost(
          "BankAccount_post_GetPlatform", {
            ID: id
          },
          res => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.BranchIdS = data.BranchList[0].RB_Branch_Id;
              this.remoteMethod(data.InemName);
              this.remoteMethod2(data.OutemName);
              this.addMsg = data;
              //let SigningLine = this.addMsg.SigningLine.slice(',')
              //this.LineId = SigningLine.length==1&&SigningLine[0]=='0'?['-1']:SigningLine
              //this.SettlementType = this.addMsg.SettlementType.slice(',')
              this.LineId =[];
              let SigningLine = this.addMsg.SigningLine.split(',')
              if(SigningLine.length==1&&SigningLine[0]=='0'){
                this.LineId =[-1];
              }
              else{
                SigningLine.forEach(item => {
                  this.LineId.push(Number(item));
                });
              }
              this.SettlementType = this.addMsg.SettlementType.split(',')

              Vue.set(this.addMsg, 'ContractStartDateInfo', [])
              this.addMsg.ContractStartDateInfo.push(data.ContractStartDateStr)
              this.addMsg.ContractStartDateInfo.push(data.ContractEndDateStr)

              this.addMsg.HaveContract = this.addMsg.HaveContract.toString()
              this.addMsg.SettlementType = this.addMsg.SettlementType.toString()
              this.addMsg.BindBankID = this.addMsg.BindBankID == -1 ? null : this.addMsg.BindBankID
              this.remoteQueryBankMethod(this.addMsg.BindBankName)

              let userInfo = this.getLocalStorage();
              let ActionMenuCode = userInfo.ActionMenuCode;
              if(userInfo.EmployeeId==this.addMsg.CreateBy||ActionMenuCode.indexOf('isManageFinance') != -1){
                this.isLookPlatformAccountPwd = true
              }else{
                this.isLookPlatformAccountPwd = false
              }
            } else {
              this.tips(res.data.message, "error");
            }
          },
          err => {}
        );
      },
      cancelEdit(t) {
        // 取消修改、新增
        this.addMsg = {
          ID: 0,
          Alias: "",
          TypeId: "",
          BackId: "",
          Accountholder: "",
          PlatformNo: "",
          Commission: "",
          Initialbalance: "",
          CurrencyId: "",
          RiskLimitMoney: "",
          BranchList: [],
          BranchIdS: 0,
          OutCharge: 0,
          InCharge: 0,
          RiskLowerLimitMoney: "",
          AccountStartMoney: 0,
          AccountStartWBMoney: 0,
          BeginTimeStr: '',
          PlatFormPwd: "",
          PlatFormUrl: "",
          ContractStartDateStr: '',
          ContractEndDateStr: "",
          ContractStartDateInfo: "",
          FinanceNo: "",
          ContractUrl: "",
          SettlementDate: "",
          SettlementInfo: "",
          WithdrawDays:0,
          WithdrawType:0,
        };
        this.examineLoading=false,
        this.ExamineMsg={
          ID:0,
          AccountState:0
        },
        this.SetProfitLossMsg = {
          ID: 0,
          EndRate: "",
          TermNum: "",
          CurrencyId: "",
          initRate: "",
          Money: "",
          AccountID: 0,
          Source: 2,
          CostTypeID: ""
        };
        if (!t) {
          this.addShow = false;
          this.ed = false;
          this.addCuren = true;
        }
        this.Charge = 3;
        let userInfo = this.getLocalStorage();
        var branchId = userInfo.RB_Branch_id;
        this.addMsg.BranchIdS = branchId;
      },
      getAccountTypeList() {
        //获取账户类型(平台账户只能获取对公账户类型)
        this.apipost(
          "AccountType_post_GetList", {},
          res => {
            if (res.data.resultCode == 1) {
              this.AccountTypeList = res.data.data;
            }
          },
          err => {}
        );
      },

      uploadImg1New(file) {
        let that = this;
        that.$message.info(this.$t('tips.shangchuanzhong'))
        //上传
        let newArr = [];
        newArr.push(file.file);
        let path = "/Upload/Temporary/";
        this.UploadSelfFileT(path, newArr, x => {
          let url = this.domainManager().ViittoFileUrl + x.data.FilePath
          // this.ContractUrl = this.domainManager().ViittoFileUrl + x.data.FilePath
          this.addMsg.ContractArray.push(url)
          that.$message.success(this.$t('tips.scchenggong'));
        });
      },
      deleteUploadFile(fIndex){
        this.addMsg.ContractArray.splice(fIndex,1)
      },
      getList() {
        //获取列表
        this.loading = true;
        this.apipost(
          "BankAccount_post_GetPlatformPageList",
          this.msg,
          res => {
            if (res.data.resultCode == 1) {
              this.total = res.data.data.count;
              let data = res.data.data.pageData;

              if (this.total > 0) {
                this.noData = false;
              } else {
                this.noData = true;
              }

              data.forEach(x => {
                x.showB = false;
                x.benBalance = Number(x.CurrentRate) * x.Initialbalance;
                // x.benBalance =this.$commonUtils.addCommas(x.benBalance);
                let allName = "";
                x.BranchName.forEach(y => {
                  allName = allName + y;
                });
                x.allName = allName;
                x.isExamine = this.isExamine
              });
              this.DataList = data;
              this.loading = false;
              // this.InitTimeFun = setInterval(()=> {this.InitTime()}, 1000);
            } else {
              this.$message.error(res.data.message);
              this.loading = false;
            }
          },
          err => {}
        );
      },
      //导出
      downMuban() {
        let msg = this.msg;
        let userInfo = this.getLocalStorage();
        msg.UId = userInfo.EmployeeId;
        this.GetLocalFile(
          "BankAccount_post_OutToExcelPlatform",
          msg,
          `${this.$t('fnc.a_ptzhanghu')}.xls`
        );
      },
      addInstitutions() {
        // 保存 修改、新增
        this.addMsg.BranchList = [];
        if (!this.addMsg.RiskLimitMoney) {
          // this.addMsg.RiskLimitMoney = 0;
          this.$message.error(this.$t('objFill.fengxiansxxdyl'));
          return
        }
        let msg = {
          ID: 0,
          Type: 2,
          RB_Branch_Id: this.addMsg.BranchIdS
        };
        this.addMsg.BranchList.push(msg);
        if (this.addMsg.ContractStartDateInfo && this.addMsg.ContractStartDateInfo != null) {
          this.addMsg.ContractStartDateStr = this.addMsg.ContractStartDateInfo[0];
          this.addMsg.ContractEndDateStr = this.addMsg.ContractStartDateInfo[1];
        }
        this.apipost(
          "BankAccount_post_SetPlatform",
          this.addMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.tips(this.$t('tips.saveYes'), "success");
              this.getList();
              this.initAddMsg();
              this.addShow = false;
            } else {
              this.$message.error(res.data.message);
            }
          },
          err => {}
        );
      },
      financeinfoRemove(id, text) {
        //删除
        this.$confirm(
            this.$t('tips.shifoudui') + "“" + text + "”" + this.$t('tips.zhshanchu'),
            this.$t('tips.tips'), {
              confirmButtonText: this.$t('pub.sureBtn'),
              cancelButtonText: this.$t('pub.cancelBtn'),
              type: "warning"
            }
          )
          .then(() => {
            this.deletInstitutions(id);
          })
          .catch(() => {
            this.$message({
              type: "info",
              message: this.$t('tips.cancleDelete')
            });
          });
      },
      deletInstitutions(id) {
        this.apipost(
          "BankAccount_post_RemovePlatform", {
            ID: id
          },
          res => {
            if (res.data.resultCode == 1) {
              this.innerVisible = false;
              this.$message.success(res.data.message);
            } else {
              this.$message.error(res.data.message);
            }
            this.getList();
          },
          err => {}
        );
      },
      examineInstitutions(state) {
        this.ExamineMsg.AccountState=state;
        this.apipost(
          "BankAccount_get_ExaminePlatform",   this.ExamineMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.innerVisible = false;
              this.$message.success(res.data.message);
            } else {
              this.$message.error(res.data.message);
            }
            this.ExamineMsg = {ID:0,AccountState:0};
            this.examineLoading = false;
            this.getList();
          },
          err => {}
        );
      },

      initAddMsg() {
        //初始化添加、修改数据
        let newMsg = {
          ID: 0,
          Alias: "",
          TypeId: "",
          BackId: "",
          Accountholder: "",
          PlatformNo: "",
          Commission: "",
          Initialbalance: "",
          CurrencyId: "",
          RiskLimitMoney: "",
          BranchList: [],
          BranchIdS: 0,
          OutCharge: 0,
          InCharge: 0,
          RiskLowerLimitMoney: ""
        };
        this.addMsg = newMsg;
        let userInfo = this.getLocalStorage();
        var branchId = userInfo.RB_Branch_id;
        this.addMsg.BranchIdS = branchId;
      },
      SetProfitLoss() {
        //币种调汇
        this.apipost(
          "FinanceInfo_post_SetProfitLoss",
          this.SetProfitLossMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.tips(res.data.message, "success");
              this.addShow = false;
              this.addCuren = true;
              this.ed = 0;
            } else {
              this.tips(res.data.message, "error");
            }
          },
          err => {}
        );
      },
      setWithdrawDays(){
        if(this.DaysMsg.AccountId<=0){this.tips('参数不正确','error');}
        this.apipost(
          "BankAccount_post_SetPlatformWithdrawDays",
          this.DaysMsg,
          res => {
            if (res.data.resultCode == 1) {
              this.tips(res.data.message, "success");
              this.DaysShow = false;
              this.getList();
            } else {
              this.tips(res.data.message, "error");
            }
          },
          err => {}
        );
      },
      submitForm(addMsg, type) {
        //提交创建、修改表单
        this.$refs[addMsg].validate(valid => {
          if (valid) {
            if (type == 1) {
              this.addInstitutions();
            } else {
              this.SetProfitLoss();
            }
          } else {
            return false;
          }
        });
      },
      resetPageIndex() {
        //查询初始化页码
        this.msg.pageIndex = 1;
        this.currentPage = 1;
      },
      handleCurrentChange(val) {
        //翻页功能按钮
        this.msg.pageIndex = val;
        this.getList();
      },
      tips(msg, type) {
        this.$message({
          message: msg,
          duration: 2000,
          type: type
        });
      },
      closeChangeMachie(done) {
        done();
        this.resetForm("addMsg");
      },
      resetForm(formName) {
        this.initAddMsg();
        this.$refs[formName].resetFields();
      },
      goUrl(path, id, name, source, CurrencyId) {
        this.$router.push({
          name: path,
          query: {
            id: id,
            name: name,
            source: source,
            CurrencyId: CurrencyId
          }
        });
      },
      InitTime() {

      }
    },
    mounted() {
      if(this.pagesTitle&&this.pagesTitle=='平台账户'){
        this.isExamine = true
      }else{
        this.msg.QAccountState = -1
        this.isExamine = false
      }
      this.getLineList()
      this.msg.pageSize = this.calcPageSize(40);
      let userInfo = this.getLocalStorage();

      this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
      var branchId = userInfo.RB_Branch_id;
      this.addMsg.BranchIdS = branchId;
      if (branchId == 0 || branchId == 49) {
        this.getCompanyList();
      } else {
        this.getCompanyList(2, userInfo);
        this.msg.RB_Branch_Id = branchId;
      }

      this.getList();
      this.initColums();
      this.getAccountTypeList();
      this.getFinancialList();
      this.getfinanceinfoList();
    },
    created() {
      Vue.component('table-operation', {
        template: `<div style='width:120px;height:40px;background:#fff;text-align:center;position: relative;left:-5px;padding-top: 6px;padding-top:6px;'>
          <el-button  v-if="rowData.isExamine==false" type="primary" size='mini' icon="el-icon-edit" circle @click="update(rowData,index)"></el-button>
          <el-button  v-if="rowData.isExamine==false" type="success" size='mini' icon="el-icon-share" circle @click="editDays(rowData,index)"></el-button>
          <el-button v-if="rowData.isExamine==false" type="danger" size='mini' icon="el-icon-delete" circle @click="deleteRow(rowData,index)"></el-button>
          <el-button v-if="rowData.AccountState==0&&rowData.isExamine"  type="examine" size='mini' icon="el-icon-check avatar-uploader-icon" circle
          @click="examineRow(rowData,index)"></el-button></div>`,
        props: {
          rowData: {
            type: Object
          },
          field: {
            type: String
          },
          index: {
            type: Number
          }
        },
        methods: {
          update() {
            let params = {
              type: 'edit',
              id: this.rowData.ID
            };
            this.$emit('on-custom-comp', params);
          },
          editDays() {
            let params = {
              type: 'days',
              id: this.rowData.ID,
              WithdrawDays:this.rowData.WithdrawDays,
              WithdrawType:this.rowData.WithdrawType
            };
            this.$emit('on-custom-comp', params);
          },
          deleteRow() {
            let params = {
              type: 'delete',
              id: this.rowData.ID,
              alias: this.rowData.Alias
            };
            this.$emit('on-custom-comp', params);
          },
          examineRow() {
            let params = {
              type: 'examine',
              id: this.rowData.ID,
              alias: this.rowData.Alias
            };
            this.$emit('on-custom-comp', params);
          }
        }
      })
    }
  };

</script>
<style scoped>
  .page_PlatformAccount .query-box li label {
    display: inline-block;
    min-width: 80px;
    text-align: right;
    font-style: normal;
    margin: 0 20px 0 0;
  }

  ._scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 8px;
  }

  ._scrollbar::-webkit-scrollbar-thumb {
    border-radius: 4px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
    background: #c9c9c9;
  }

  ._scrollbar::-webkit-scrollbar-track {
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #ededed;
  }

  .page_PlatformAccount ._vMG_edit {
    overflow: auto;
    display: none;
    position: absolute;
    font-family: "PingFangSc-Fine";
    bottom: 0;
    left: 0;
    border-top: 3px solid #38425d;
    background-color: #ffffff;
    padding: 10px;
    width: 100%;
  }

  .page_PlatformAccount ._vMG_edit ._tit {
    padding-left: 10px;
    border-left: 3px solid #e95252;
    font-size: 16px;
    color: #000000;
  }

  .page_PlatformAccount ._vMG_edit ._tit span {
    color: #666666;
    font-size: 14px;
  }


  /deep/ .page_PlatformAccount ._vMG_edit .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9 !important;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .page_PlatformAccount ._vMG_edit.avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  .page_PlatformAccount ._vMG_edit .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 148px;
    height: 148px;
    line-height: 148px;
    text-align: center;
    border: 1px solid #eee;
  }

  ._vMG_edit {
    overflow: auto;
    position: absolute;
    height: 200px;
    z-index: 50;
    bottom: 0;
    left: 0;
    border-top: 1px solid #d1d1d1;
    background-color: #FFFFFF;
    padding: 20px 20px 0;
    width: 100%;
  }

  ._vMG_edit>p {
    border-left: 3px solid #E95252;
    text-indent: 15px;
    height: 14px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 14px;
    color: #000;
  }

  ._vMG_edit .el-form-item__label {
    font-size: 12px !important;
  }

  ._vMG_edit .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  ._vMG_edit .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  ._vMG_edit .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 148px;
    height: 148px;
    line-height: 148px;
    text-align: center;
  }

  ._vMG_edit .avatar {
    width: 148px;
    height: 148px;
    display: block;
  }



  .cm_content {
    margin: 0;
    padding: 0;
    overflow-x: auto;
  }

  ._edHeight {
    height: 500px;
  }

  .edHeight {
    display: block !important;
    height: 400px;
  }

  .edHeight_t {
    display: block !important;
    height: 152px;
  }

  .page_PlatformAccount ._info_box ul li {
    float: left;
    margin-right: 12px;
  }

  .instMg_list_item {
    width: 296px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ebebeb;
    float: left;
    background: rgba(255, 255, 255, 1);
    overflow: hidden;
    margin-right: 15px;
    margin-bottom: 15px;
  }

  .instMg_list_item:hover {
    box-shadow: 0px 0px 20px rgba(191, 191, 191, 1);
    transition: all linear 0.5s;
  }

  ._tips {
    font-size: 12px;
    color: #666666;
    padding: 15px 0;
  }

  ._top {
    text-align: center;
    height: 50px;
    border-bottom: 1px solid #eeeeee;
    overflow: hidden;
    padding: 10px 0;
  }

  ._top img {
    height: 100%;
  }

  ._bt {
    padding: 20px;
    font-size: 14px;
  }

  ._bt_t {
    border-radius: 4px;
    background-color: #47bf8c;
    color: #ffffff;
  }

  ._bt_t>p {
    padding: 10px 0;
    text-align: center;
  }

  ._bt_t>p>span {
    display: inline-block;
    padding: 3px 10px;
    background-color: #ffa200;
    border-radius: 4px;
  }

  ._bt_t ._btt_b {
    padding: 14px;
    background-color: #32b37c;
  }

  ._bt_t ._btt_b>div:nth-child(1) {
    display: flex;
    text-align: center;
    padding: 0 0 9px 0;
  }

  ._bt_t ._btt_b>div>p {
    flex: 1;
  }

  ._bt_t ._btt_b>div:nth-child(1)>p:nth-child(2) {
    border-left: 2px solid #4fc794;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 5px;
  }

  .icon-img-ren {
    color: #4fc794;
  }

  ._bt_t ._btt_b .PingFangSC {
    font-weight: bold;
    text-align: center;
    padding: 5px 0;
    border: 1px solid rgba(79, 199, 148, 1);
    border-radius: 4px;
    width: 162px;
  }

  .icon-qiehuan,
  .icon-ico-renwuyaoqiu {
    background-color: #e7e7e7;
    border-radius: 50%;
    color: #999999;
    font-size: 12px;
    width: 18px;
    height: 18px;
    display: inline-block;
    text-align: center;
    line-height: 19px;
    cursor: pointer;
  }

  .icon-ico-renwuyaoqiu {
    font-size: 10px;
  }

  .icon-qiehuan:hover,
  .icon-ico-renwuyaoqiu:hover {
    background-color: #e95252;
    color: white;
  }

  ._bt_b {
    padding: 15px 0 0 0;
    border-bottom: 1px solid #eeeeee;
  }

  ._bt_b>p {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
  }

  ._bt_b>p span._name {
    color: #333333;
    font-size: 12px;
  }

  ._btn {
    padding: 20px 30px 0 30px;
    text-align: center;
  }

  ._btn span {
    display: inline-block;
    font-size: 12px;
    background-color: #e7e7e7;
    color: #333333;
    padding: 5px 20px;
    border-radius: 14px;
    cursor: pointer;
    margin-left: 10px;
  }

  ._btn span:hover {
    background-color: #e95252;
    color: white;
  }

  .fc_green {
    color: #47bf8c !important;
  }

  .fc_red {
    color: #e95252 !important;
  }

  .page_PlatformAccount .PingFangSC,
  ._bold,
  .PingFangCom {
    font-weight: bold;
  }

  ._no_bold {
    font-weight: normal;
  }

  ._max_wd {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
    display: inline-block;
  }

  ._bt_t .PingFangCom {
    font-family: "PingFangSC-fine" !important;
    text-align: center;
    padding: 6px 2px;
    border-radius: 4px;
    width: 50px;
    background-color: #19a268;
    margin-left: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    overflow: hidden;
  }

  ._btt_b>div:nth-child(1).over_ellipsis {
    max-width: 107px;
  }

  ._add_saveBtn {
    text-align: right;
    margin-bottom: 10px;
  }

  ._cp_name {
    width: 185px;
    display: inline-block;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    overflow: hidden;
    text-align: right;
  }

  ._underline {
    text-decoration: underline;
    cursor: pointer;
  }

  .page_PlatformAccount .el-button-group .el-button {
    padding: 4px;
  }

  ._yingkui {
    height: 40px;
    line-height: 40px;
    font-size: 12px;
    color: #666666;
    padding-left: 20px;
  }

  .page_PlatformAccount .query-box {
    padding: 20px 0 0;
  }

  .page_PlatformAccount ._wAuto {
    width: auto;
  }

  .el-date-editor.el-input {
    width: 100% !important;
  }

  .page_PlatformAccount .el-input-group__append,
  .page_PlatformAccount .el-input-group__prepend {
    border-radius: 0px;
  }

  .right-tag {
    float: right;
    color: rgb(255, 255, 255);
    font-size: 12px;
    background: rgb(64, 158, 255);
    padding: 2px 7px;
    border-radius: 2px;
    height: 22px;
    line-height: 18px;
    margin-top: 7px;
  }

  .el-select-dropdown__item.selected {
    font-weight: unset;
  }

  .minmargin-box .el-select-dropdown__item {
    padding: 0 5px;
  }

  .monthAndKmStyle {
    display: flex;

    ::v-deep {
      .el-input {
        width: 50%;
        display: inline-block;
      }
    }
  }
  ._info_img ul {
    /* padding: 10px 0 */
  }

  ._info_img ul li {
    height: 52px;
    float: left;
    position: relative;
    cursor: pointer
  }

  ._info_img ul li:hover ._see_img {
    opacity: 1;
  }

  ._info_img ul li img {
    width: 50px;
    height: 50px;
  }

  ._see_img {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50px;
    line-height: 34px;
    text-align: center;
    background-color: rgba(2, 2, 2, 0.3);
    display: inherit;
    opacity: 0;
    transition: all linear .5s
  }

  ._see_img i.iconfont {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-top: 8px;
    border-radius: 50%;
    color: #FFFFFF !important;
    background-color: rgba(255, 255, 255, 0.5);
  }

  ._show_img_box {
    position: fixed;
    background: rgba(0, 0, 0, .6);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    text-align: center;
    overflow: auto;
  }
  .page_PlatformAccount .icon-guanbi1 {
    width: 18px;
    height: 18px;
    line-height: 20px;
    text-align: center;
    color: #fff;
    position: absolute;
    right: -5px;
    top: -10px;
    background: #dedede;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    z-index: 3;
}
.page_PlatformAccount .el-image {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

</style>

