<!--
 * @Descripttion:
 * @version:
 * @Author: kBank
 * @Date: 2022-10-24 15:45:01
-->
<template>
  <div class="page">
    <topBar v-if="topList.length > 0" :top-list="topList" :moren="moren" />
    <div v-if="topList[0].changed == true">
      <div class="thetopbox">
        <el-form
          ref="select"
          :model="select"
          style="background-color: #fff"
          label-width="100px"
        >
          <el-row>
            <!-- 一层 -->
            <el-col :span="4">
              <el-form-item :label="$t('MN_T_1')">
                <el-input v-model="select.memberCode" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('CK_KS_14')">
                <el-input v-model="select.memberName" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_534')">
                <el-select
                  v-model="select.status"
                  clearable
                  :placeholder="$t('CK_KS_38')"
                >
                  <el-option
                    v-for="item in statusList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_535')">
                <el-select
                  v-model="select.pkAccount"
                  clearable
                  :placeholder="$t('CK_KS_38')"
                >
                  <el-option
                    v-for="item in accountList"
                    :key="item.pkId"
                    :label="item.accountName"
                    :value="item.pkId"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_11')">
                <el-select
                  v-model="select.approveState"
                  clearable
                  :placeholder="$t('CK_KS_38')"
                >
                  <el-option
                    v-for="item in shStateList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('CK_KS_41')">
                <el-input v-model="select.bankName" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_536')">
                <el-input v-model="select.cashAmount" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_537')">
                <el-input v-model="select.subBankName" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_538')">
                <el-input v-model="select.cardNumber" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_539')">
                <el-input v-model="select.accountName" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_540')">
                <el-input v-model="select.phone" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_541')">
                <el-input v-model="select.remarks" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_542')">
                <el-input v-model="select.issuedAmount" clearable />
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-form-item :label="$t('MN_F_T_829')">
                <el-select v-model="select.vertexId" clearable>
                  <el-option
                    v-for="item in vertexList"
                    :key="item.pkId"
                    :label="item.vertexName"
                    :value="item.pkId"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-collapse-transition>
              <div v-show="isActive">
                <el-col :span="4">
                  <el-form-item :label="$t('MN_F_T_543')">
                    <el-input v-model="select.paymentName" clearable />
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item :label="$t('MN_F_T_544')">
                    <el-input v-model="select.payerRemarks" clearable />
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                  <el-form-item :label="$t('w_0296')">
                    <el-input v-model="select.withdrawCode" clearable />
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item :label="$t('MN_F_T_707')">
                    <el-date-picker
                      v-model="creationTime"
                      value-format="yyyy-MM-dd"
                      type="daterange"
                      :range-separator="$t('w_0139')"
                      :start-placeholder="$t('CK_KS_4')"
                      :end-placeholder="$t('CK_KS_5')"
                      @change="changeTime"
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="8">
                  <el-form-item :label="$t('MN_F_Y_4')">
                    <el-date-picker
                      v-model="creationTime1"
                      value-format="yyyy-MM-dd"
                      type="daterange"
                      :range-separator="$t('w_0139')"
                      :start-placeholder="$t('CK_KS_4')"
                      :end-placeholder="$t('CK_KS_5')"
                      @change="changeTime1"
                    />
                  </el-form-item>
                </el-col>
              </div>
            </el-collapse-transition>
            <el-col :span="4">
              <el-button
                class="my_search"
                style="margin-left: 30px"
                @click="getDataList"
                v-has-buttons="['CashSearch']"
              >
                {{ $t("MN_T_2") }}</el-button
              >
              <el-button class="my_reset" @click="reset">
                {{ $t("MN_T_3") }}</el-button
              >
            </el-col>
          </el-row>
          <div class="openClose" @click="isActive = !isActive">
            <i :class="isActive ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" />
            <div>{{ isActive ? $t("MN_F_T_545") : $t("MN_F_T_546") }}</div>
          </div>
        </el-form>
      </div>
      <div class="main">
        <div class="maintop">
          <div class="mainbtn">
            <el-button
              v-has-buttons="['CashDetailsPay']"
              size="small"
              :disabled="this.checkArr.length == 0"
              class="thebtn2"
              @click="openDig(0)"
              >{{ $t("MN_F_T_547") }}</el-button
            >
            <el-button
              v-has-buttons="['CashDetailsRecharge']"
              size="small"
              :disabled="this.checkArr.length == 0"
              class="thebtn3"
              @click="openDig(1)"
              >{{ $t("MN_F_T_548") }}</el-button
            >
            <el-button
              v-has-buttons="['CashDetailsApprove']"
              size="small"
              :disabled="this.checkArr.length == 0"
              class="thebtn1"
              @click="toQc"
              >{{ $t("MN_F_T_549") }}</el-button
            >
            <el-button
              v-has-buttons="['CashDetailsExport']"
              size="small"
              class="thebtn4"
              @click="handleExport"
            >
              {{ $t("MN_T_8") }}</el-button
            >
          </div>
        </div>

        <div style="overflow: auto">
          <el-table
            ref="mainTable"
            :data="tableData"
            v-loading="loading"
            height="600"
            :header-cell-style="{ background: '#EEEEEE' }"
            :summary-method="getSummaries"
            show-summary
            :row-class-name="tableRowClassName"
            @selection-change="handleSelectionChange"
          >
            <el-table-column type="selection" width="55" />
            <el-table-column
              v-if="showData.pkCountryName"
              align="center"
              prop="jxmc"
              :label="$t('S_C_83')"
            >
              <template slot-scope="scope">
                <div class="tem">
                  <img :src="scope.row.nationalFlag2" alt="" />
                  <!-- <div>{{ scope.row.pkCountryName }}</div> -->
                </div>
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.memberCode"
              align="center"
              prop="memberCode"
              width="130"
              :label="$t('MN_T_1')"
            />
            <el-table-column
              v-if="showData.memberName"
              align="center"
              prop="memberName"
              :label="$t('CK_KS_14')"
            />
            <el-table-column
              v-if="showData.vertexName"
              align="center"
              prop="vertexName"
              :label="$t('MN_F_T_829')"
            />
            <el-table-column
              v-if="showData.pkAccountVal"
              align="center"
              prop="pkAccountVal"
              :label="$t('MN_F_T_535')"
            />
            <el-table-column
              v-if="showData.availableAmount"
              align="center"
              prop="availableAmount"
              :label="$t('MN_F_T_550') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.availableAmount | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.cashAmount"
              align="center"
              prop="cashAmount"
              :label="$t('MN_F_T_551') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.cashAmount | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.availableBalance"
              align="center"
              prop="availableBalance"
              :label="$t('MN_F_T_552') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.availableBalance | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.serviceCharge"
              align="center"
              prop="serviceCharge"
              :label="$t('MN_F_T_553') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.serviceCharge | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.incomeTax"
              align="center"
              prop="incomeTax"
              :label="$t('MN_F_T_554') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.incomeTax | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.issuedAmount"
              align="center"
              prop="issuedAmount"
              :label="$t('MN_F_T_555') + `(${isLocalSymbol()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.issuedAmount | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.settleCashAmount"
              align="center"
              prop="settleCashAmount"
              :label="$t('MN_F_T_551') + `(${isLocals()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.settleCashAmount | numberToCurrency }}
              </template>
            </el-table-column>
            <!-- lll -->
            <el-table-column
              v-if="showData.settleServiceCharge"
              align="center"
              prop="settleServiceCharge"
              :label="$t('MN_F_T_553') + `(${isLocals()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.settleServiceCharge | numberToCurrency }}
              </template>
            </el-table-column>

            <el-table-column
              v-if="showData.settleIncomeTax"
              align="center"
              prop="settleIncomeTax"
              :label="$t('MN_F_T_554') + `(${isLocals()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.settleIncomeTax | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.settleIssuedAmount"
              align="center"
              prop="settleIssuedAmount"
              :label="$t('MN_F_T_555') + `(${isLocals()})`"
              width="100"
            >
              <template slot-scope="scope">
                {{ scope.row.settleIssuedAmount | numberToCurrency }}
              </template>
            </el-table-column>
            <el-table-column
              v-if="showData.exchangeRate"
              align="center"
              prop="exchangeRate"
              :label="$t('MN_F_T_556')"
            />

            <!-- lll -->
            <el-table-column
              v-if="showData.creationTime"
              align="center"
              prop="creationTime"
              width="200"
              :label="$t('MN_F_T_707')"
            />
            <el-table-column
              v-if="showData.bankName"
              align="center"
              prop="bankName"
              :label="$t('CK_KS_41')"
            />
            <el-table-column
              v-if="showData.subBankName"
              align="center"
              prop="subBankName"
              :label="$t('MN_F_T_537')"
            />
            <el-table-column
              v-if="showData.cardNumber"
              align="center"
              prop="cardNumber"
              :label="$t('MN_F_T_538')"
            />
            <el-table-column
              v-if="showData.accountName"
              align="center"
              prop="accountName"
              :label="$t('MN_F_T_539')"
            />
            <el-table-column
              align="center"
              prop="accountProvince"
              :label="$t('开户支行省')"
              width="130"
            />
            <el-table-column
              align="center"
              prop="accountCity"
              :label="$t('开户支行市')"
              width="130"
            />
            <el-table-column
              v-if="showData.phone"
              align="center"
              prop="phone"
              :label="$t('MN_F_T_540')"
            />
            <el-table-column
              v-if="showData.idCard"
              align="center"
              prop="idCard"
              :label="$t('w_0183')"
              width="100"
            />
            <el-table-column
              align="center"
              prop="validStartDate"
              :label="$t('有效期起始日期')"
              width="130"
            />
            <el-table-column
              align="center"
              prop="validEndDate"
              :label="$t('有效期截止日期')"
              width="130"
            />
            <el-table-column
              v-if="showData.remarks"
              align="center"
              prop="remarks"
              :label="$t('MN_F_T_541')"
            />
            <el-table-column
              v-if="showData.approveName"
              align="center"
              prop="approveName"
              :label="$t('MN_F_T_522')"
            />
            <el-table-column
              v-if="showData.approveTime"
              align="center"
              prop="approveTime"
              :label="$t('MN_F_Y_4')"
            />
            <el-table-column
              v-if="showData.approveRemarks"
              align="center"
              prop="approveRemarks"
              :label="$t('MN_F_T_526')"
            />
            <el-table-column
              v-if="showData.paymentName"
              align="center"
              prop="paymentName"
              :label="$t('MN_F_T_543')"
            />
            <el-table-column
              v-if="showData.statusVal"
              align="center"
              prop="statusVal"
              :label="$t('MN_F_T_534')"
            />
            <el-table-column
              v-if="showData.paymentTime"
              align="center"
              prop="paymentTime"
              :label="$t('MN_F_T_926')"
            />
            <el-table-column
              v-if="showData.payerRemarks"
              align="center"
              prop="payerRemarks"
              :label="$t('MN_F_T_544')"
            />
            <el-table-column
              v-if="showData.approveStateVal"
              align="center"
              prop="approveStateVal"
              :label="$t('MN_F_11')"
            />
            <el-table-column
              v-if="showData.withdrawCode"
              align="center"
              prop="withdrawCode"
              width="200"
              :label="$t('w_0296')"
            />
            <el-table-column
              align="center"
              prop="time"
              :label="$t('MY_ORD_14')"
              width="160"
              fixed="right"
            >
              <template slot-scope="scope">
                <div style="display: flex">
                  <el-button
                    v-if="
                      scope.row.approveState == 5 &&
                      scope.row.status != 1 &&
                      scope.row.status != 2
                    "
                    type="text"
                    style="padding: 8px"
                    size="small"
                    @click="openDig(1, scope.row.pkId)"
                  >
                    {{ $t("MN_F_T_548") }}
                  </el-button>
                  <el-button
                    v-if="
                      scope.row.approveState == 5 &&
                      scope.row.status != 1 &&
                      scope.row.status != 2
                    "
                    style="padding: 8px; color: #ed1d25"
                    type="text"
                    size="small"
                    @click="openDig(0, scope.row.pkId)"
                  >
                    {{ $t("MN_F_T_547") }}
                  </el-button>
                  <el-button
                    style="padding: 8px; color: #ed1d25"
                    type="text"
                    size="small"
                    @click="toFixed(scope.row.pkId)"
                  >
                    {{ $t("MN_T_8") }}
                  </el-button>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getDataList"
      />
    </div>
    <el-dialog
      :title="$t('w_0034')"
      :visible.sync="centerDialogVisible"
      width="30%"
      :close-on-click-modal="false"
      center
    >
      <div class="gth">
        <img src="@/assets/images/gth.png" alt="" />
        <div>{{ $t("w_0035") }}要{{ isCz == 1 ? "充正" : "打款" }}吗</div>
      </div>
      <el-form ref="form" :model="form" label-width="auto">
        <el-form-item :label="$t('MY_WAL_22')">
          <el-input v-model="form.payerRemarks" type="textarea" />
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="centerDialogVisible = false">{{
          $t("ENU_P_TYPE0")
        }}</el-button>
        <el-button type="primary" @click="saveForm">{{
          $t("ENU_P_TYPE4")
        }}</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import topBar from "@/components/topBarRole";
import { getVartexList } from "@/api/affiliatedteam";

import * as api from "@/api/financialCase.js";
import { isLocals, isLocalSymbol, stateFormat } from "@/utils/numberToCurrency";
import { getRouters } from "@/api/settle";
import { mapGetters } from "vuex";
import { numberToCurrencyNo } from "@/utils/numberToCurrency";
import { getRoleMenu } from "@/api/notice";
export default {
  name: "Bzpz",
  components: {
    topBar,
  },
  filters: {
    isAgree(val) {
      if (!val) {
        return this.$t("ENU_POPUP_TYPE_1");
      } else {
        return this.$t("ENU_POPUP_TYPE_2");
      }
    },
  },
  data() {
    return {
      // 折叠搜索框
      isActive: false,
      moren: "cashDetails",
      topList: [
        {
          name: this.$t("MN_F_T_90"),
          path: "cashDetails",
          url: "CashDetails",
          changed: false,
        },
        {
          name: this.$t("MN_F_T_91"),
          path: "jdToPay",
          url: "jdToPay",
          changed: false,
        },
      ],
      centerDialogVisible: false,
      creationTime: [],
      creationTime1: [],
      shStateList: [],
      select: {
        approveState: 1,
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 50,
      },
      total: 0,
      dialogVisible: false,
      loading: false,
      tableData: [],
      accountList: [],
      tradeTypeList: [],
      checkArr: [],
      postArr: [],
      form: {
        payerRemarks: "",
      },
      isCz: 0,
      checkArrAll: [],
      statusList: [],
      vertexList: [],
      lastData: "",
      dataList: [
        {
          name: "pkCountryName",
          key: "",
        },
        {
          name: "memberCode",
          key: "",
        },
        {
          name: "memberName",
          key: "",
        },
        {
          name: "pkAccountVal",
          key: "",
        },
        {
          name: "availableAmount",
          key: "",
        },
        {
          name: "cashAmount",
          key: "",
        },
        {
          name: "availableBalance",
          key: "",
        },
        {
          name: "serviceCharge",
          key: "",
        },
        {
          name: "incomeTax",
          key: "",
        },
        {
          name: "issuedAmount",
          key: "",
        },
        {
          name: "settleCashAmount",
          key: "",
        },
        {
          name: "settleServiceCharge",
          key: "",
        },
        {
          name: "settleIncomeTax",
          key: "",
        },
        {
          name: "settleIssuedAmount",
          key: "",
        },
        {
          name: "exchangeRate",
          key: "",
        },
        {
          name: "creationTime",
          key: "",
        },
        {
          name: "bankName",
          key: "",
        },
        {
          name: "subBankName",
          key: "",
        },
        {
          name: "cardNumber",
          key: "",
        },
        {
          name: "accountName",
          key: "",
        },
        {
          name: "phone",
          key: "",
        },
        {
          name: "remarks",
          key: "",
        },
        {
          name: "approveName",
          key: "",
        },
        {
          name: "approveTime",
          key: "",
        },
        {
          name: "approveRemarks",
          key: "",
        },
        {
          name: "paymentName",
          key: "",
        },
        {
          name: "statusVal",
          key: "",
        },
        {
          name: "paymentTime",
          key: "",
        },
        {
          name: "payerRemarks",
          key: "",
        },
        {
          name: "approveStateVal",
          key: "",
        },
        {
          name: "withdrawCode",
          key: "",
        },
      ],
      showData: {},
    };
  },
  computed: {
    ...mapGetters(["getUser"]),
  },
  mounted() {
    // 获取下拉
    this.getData();
    // 获取列表
    this.getDataList();
    // //审核状态
    this.getApproveStatus();
    this.getPaymentStatus();
    this.getUserRoute();
    this.getUserRole();
  },
  methods: {
    isLocals,
    isLocalSymbol,
    getUserRole() {
      getRoleMenu("CashDetails").then((res) => {
        const obj = {};
        res.data.forEach((ele) => {
          obj[ele] = true;
        });
        this.showData = obj;
        // this.dataList.forEach((item) => {
        //   res.data.forEach((items) => {
        //     if (item.name == items) {
        //       item.key = items
        //     }
        //     // this.flag = true
        //   })
        // })
      });
    },
    getPaymentStatus() {
      api.paymentStatus().then((res) => {
        this.statusList = res.data;
      });
    },
    stateFormat,
    // 审核状态
    getApproveStatus() {
      api.getApproveStatuss().then((res) => {
        this.shStateList = res.data;
      });
    },
    getUserRoute() {
      getRouters().then((res) => {
        res.data.forEach((item) => {
          this.topList.forEach((items) => {
            if (item.routeName == items.url) {
              items.changed = true;
            }
          });
        });
      });
    },
    saveForm() {
      let url;
      if (this.isCz == 1) {
        url = api.positive;
      } else {
        url = api.payment;
      }
      url(Object.assign(this.form, { pkIds: this.postArr })).then((res) => {
        if (res.code == 200) {
          this.$message({
            message: res.msg,
            type: "success",
          });
          // 获取列表
          this.getDataList();
          this.centerDialogVisible = false;
        }
      });
    },
    openDig(index, id) {
      // if (index == 0) {
      let dk = false;
      this.checkArrAll.forEach((item) => {
        // item.approveState== 5&&item.status != 1&&item.status != 2
        if (item.approveState != 5 || item.status == 1 || item.status == 2) {
          dk = true;
        }
      });
      if (dk) {
        this.$message({
          message: this.$t("MN_F_T_557"),
          type: "warning",
        });
        return false;
      }
      // }
      this.isCz = index;
      if (id) {
        this.postArr = [id];
      } else {
        this.postArr = this.checkArr;
      }
      this.centerDialogVisible = true;
    },
    toQc() {
      api.showWithdraw(this.checkArr).then((res) => {
        if (res.code == 200) {
          this.$router.push({
            path: "txzxqc",
            query: {
              data: JSON.stringify(res.data),
            },
          });
        }
      });
    },
    reset() {
      this.select = {};
      this.creationTime = [];
      this.creationTime1 = [];
      this.getDataList();
    },
    getData() {
      api.pkBdAccountList().then((res) => {
        this.accountList = res.rows;
      });
      api.getTradeType().then((res) => {
        this.tradeTypeList = res.data;
      });
      getVartexList().then((res) => {
        this.vertexList = res.data;
      });
    },
    changeTime(val) {
      if (!val) {
        val = ["", ""];
      }
      this.select.startDate = val[0] || "";
      this.select.endDate = val[1] || "";
    },
    changeTime1(val) {
      if (!val) {
        val = ["", ""];
      }
      this.select.startPaymentTime = val[0] || "";
      this.select.endPaymentTime = val[1] || "";
    },
    // 点击修改
    toFixed(id) {},
    getDataList() {
      this.loading = true;
      api
        .withdrawList(Object.assign({}, this.queryParams, this.select))
        .then((res) => {
          res.rows.forEach((item) => {
            item.nationalFlag2 = this.getUser.country.nationalFlag2;
          });
          this.lastData = res.rows[res.rows.length - 1];
          let arr = JSON.parse(JSON.stringify(res.rows));
          arr = arr.filter(function (v, i, ar) {
            return i !== ar.length - 1;
          });
          this.tableData = arr;
          this.total = res.total;
          this.loading = false;
          this.$nextTick(() => {
            this.$refs.mainTable.doLayout();
          });
        });
    },
    getSummaries(param) {
      // this.$nextTick(() => {
      if (this.lastData) {
        const obj = this.lastData;

        return [
          "",
          this.$t("MN_F_T_688"),
          "",
          "",
          "",
          "",
          numberToCurrencyNo(obj.cashAmount),
          "",
          numberToCurrencyNo(obj.serviceCharge),
          numberToCurrencyNo(obj.incomeTax),
          numberToCurrencyNo(obj.issuedAmount),
          numberToCurrencyNo(obj.settleCashAmount),
          numberToCurrencyNo(obj.settleServiceCharge),
          numberToCurrencyNo(obj.settleIncomeTax),
          numberToCurrencyNo(obj.settleIssuedAmount),
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
          "",
        ];
      } else {
        return [];
      }

      // })
    },
    //       obj.availableAmount
    // obj.cashAmount
    // obj.availableBalance
    // obj.serviceCharge
    // obj.incomeTax
    // obj.issuedAmount
    // obj.settleCashAmount
    // obj.settleServiceCharge
    // obj.settleIncomeTax
    // obj.settleIssuedAmount
    // getSummaries(param){
    //   // setTimeout(()=>{
    //     return [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
    //   // },5000)

    // },
    handleSelectionChange(val) {
      this.checkArrAll = val;
      this.checkArr = val.map((item) => {
        return item.pkId;
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.$confirm(this.$t("MN_F_T_407"), this.$t("MN_F_T_304"), {
        confirmButtonText: this.$t("w_0035"),
        cancelButtonText: this.$t("ENU_P_TYPE0"),
        type: "warning",
      }).then((_) => {
        this.download(
          "/member/manager/withdraw/export",
          Object.assign({}, this.queryParams, this.select),
          `提现明细-${new Date().getTime()}.xlsx`
        );
      });
    },
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 1) {
        return "warning-row";
      } else if (rowIndex % 2 == 0) {
        return "success-row";
      }
      return "";
    },
  },
};
</script>
<style scoped lang="scss">
::v-deep .el-table .warning-row {
  background: #f9f9f9;
}

::v-deep .el-table .success-row {
  background: #ffffff;
}
::v-deep .el-table thead {
  color: #000000;
}
::v-deep .el-select {
  width: 100%;
}
.page {
  padding: 0px;
  background: #f9f9f9;
  font-size: 14px;
  overflow: auto;
  .main {
    .maintop {
      display: flex;
      padding: 0px 0;
      justify-content: space-between;
      align-items: center;
      .mainbtn {
        .thebtn1 {
          background: #3181e5;
          color: #ffffff;
          //width: 68px;
          height: 32px;
        }
        .thebtn4 {
          background: #ffad41;
          color: #ffffff;
          width: 68px;
          height: 32px;
        }
        .thebtn2 {
          background: #c73030;
          color: #ffffff;
          width: 68px;
          height: 32px;
        }
        .thebtn3 {
          background: #6962f6;
          color: #ffffff;
          width: 68px;
          height: 32px;
        }
      }
      .maintitle {
        font-size: 10px;
        font-family: MicrosoftYaHei;
        color: #999999;
      }
    }
  }
  .tem {
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: 28px;
      height: 20px;
      margin-right: 3px;
    }
  }
  .isRed {
    color: #ed1d25;
  }
  .isGreen {
    color: #1ab62b;
  }
  .bgImg {
    width: 48px;
    height: 48px;
  }
}

.gth {
  text-align: center;
  margin-bottom: 30px;
  img {
    width: 87px;
    height: 78px;
    margin-bottom: 10px;
  }
}
.openClose {
  margin-right: 10px;
  color: #666666;
  text-align: center;
}
</style>
