<template>
  <view class="content">
    <view class="header_a">
      <view class="header">
        <img @click="isTop = true" src="@/assets/images/search.png" alt="" />
        <img @click="isFont = true" src="@/assets/images/change.png" alt="" />
      </view>
    </view>
    <view class="zhan"></view>
    <view class="member-card" v-for="(item, index) in tableData" :key="index">
      <view class="card-item" v-if="allTxt.memberCode">
        <text class="card-item-label">{{ '会员编号' }}:</text>
        <text class="card-item-value">{{ item.memberCode }}</text>
      </view>
      <view class="card-item" v-if="allTxt.memberName">
        <text class="card-item-label">{{ '会员姓名' }}:</text>
        <text class="card-item-value">{{ item.memberName }}</text>
      </view>
      <view class="card-item" v-if="allTxt.phone">
        <text class="card-item-label">{{ '联系方式' }}:</text>
        <text class="card-item-value">{{ item.phone }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('parMemberCode') && allTxt.parMemberCode"
      >
        <text class="card-item-label">{{ '推荐编号' }}:</text>
        <text class="card-item-value">{{ item.parMemberCode }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('parMemberName') && allTxt.parMemberName"
      >
        <text class="card-item-label">{{ '推荐姓名' }}:</text>
        <text class="card-item-value">{{ item.parMemberName }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('placeMemberCode') && allTxt.placeMemberCode"
      >
        <text class="card-item-label">安置编号:</text>
        <text class="card-item-value">{{ item.placeMemberCode }}</text>
      </view>
      <view class="card-item" v-if="allTxt.placeMemberCode">
        <text class="card-item-label">安置部门:</text>
        <text class="card-item-value">{{ item.placeDeptVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('placeMemberName') && allTxt.placeMemberName"
      >
        <text class="card-item-label">安置姓名:</text>
        <text class="card-item-value">{{ item.placeMemberName }}</text>
      </view>
      <view class="card-item" v-if="allTxt.pkAwardsVal">
        <text class="card-item-label">{{ '荣誉奖衔' }}:</text>
        <text class="card-item-value">{{ item.pkAwardsVal }}</text>
      </view>
      <view class="card-item" v-if="allTxt.orderSourceVal">
        <text class="card-item-label">{{ '订单类型' }}:</text>
        <text class="card-item-value">{{ item.orderSourceVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('centerMemberCode') && allTxt.centerMemberCode"
      >
        <text class="card-item-label">{{ '服务中心编号' }}:</text>
        <text class="card-item-value">{{ item.centerMemberCode }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('centerMemberName') && allTxt.centerMemberName"
      >
        <text class="card-item-label">{{ '服务中心姓名' }}:</text>
        <text class="card-item-value">{{ item.centerMemberName }}</text>
      </view>

      <view
        class="card-item"
        v-if="
          getColumnVisible('pkRegisterGradeVal') && allTxt.pkRegisterGradeVal
        "
      >
        <text class="card-item-label">{{ '注册等级' }}:</text>
        <text class="card-item-value">{{ item.pkRegisterGradeVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('pkSettleGradeVal') && allTxt.pkSettleGradeVal"
      >
        <text class="card-item-label">{{ '结算等级' }}:</text>
        <text class="card-item-value">{{ item.pkSettleGradeVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('consumeMoney') && allTxt.consumeMoney"
      >
        <text class="card-item-label"
          >{{ '注册金额' + `(${isLocalSymbol()})` }}:</text
        >
        <text class="card-item-value">{{
          item.consumeMoney | toThousandthAndKeepDecimal
        }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('consumeAchieve') && allTxt.consumeAchieve"
      >
        <text class="card-item-label"
          >{{ '注册业绩' + `(${isLocals()})` }}:</text
        >
        <text class="card-item-value">{{
          item.consumeAchieve | toThousandthAndKeepDecimal
        }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('vertexName') && allTxt.vertexName"
      >
        <text class="card-item-label">{{ '隶属体系' }}:</text>
        <text class="card-item-value">{{ item.vertexName }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('teamName') && allTxt.teamName"
      >
        <text class="card-item-label">{{ '隶属团队' }}:</text>
        <text class="card-item-value">{{ item.teamName }}</text>
      </view>
      <view
        class="card-item"
        v-if="
          getColumnVisible('registerAuthorityVal') &&
          allTxt.registerAuthorityVal
        "
      >
        <text class="card-item-label">{{ '注册权限' }}:</text>
        <text class="card-item-value">{{ item.registerAuthorityVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('isRealNameVal') && allTxt.isRealNameVal"
      >
        <text class="card-item-label">{{ '实名认证' }}:</text>
        <text class="card-item-value">
          <span v-if="item.isRealName == 0" style="color: #009b58">已认证</span>
          <span v-if="item.isRealName == 1" style="color: #c8161d">未认证</span>
        </text>
      </view>
      <view class="card-item" v-if="allTxt.serviceAgreementVal">
        <text class="card-item-label">服务协议:</text>
        <text class="card-item-value">{{ item.serviceAgreementVal }}</text>
      </view>
      <view class="card-item">
        <text class="card-item-label">复购免考:</text>
        <text class="card-item-value">{{
          item.purchaseStatus === 0 ? '是' : '否'
        }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('accountStatusVal') && allTxt.accountStatusVal"
      >
        <text class="card-item-label">{{ '账户状态' }}:</text>
        <text class="card-item-value">{{ item.accountStatusVal }}</text>
      </view>
      <view
        class="card-item"
        v-if="getColumnVisible('memberAccountVal') && allTxt.memberAccountVal"
      >
        <text class="card-item-label">{{ '钱包状态' }}:</text>
        <text class="card-item-value">{{ item.memberAccountVal }}</text>
      </view>
      <view class="card-item" v-if="allTxt.incomeStatusVal">
        <text class="card-item-label">{{ '收益状态' }}:</text>
        <text class="card-item-value">{{ item.incomeStatusVal }}</text>
      </view>
      <view class="card-item" v-if="allTxt.creationTime">
        <text class="card-item-label">{{ '创建日期' }}:</text>
        <text class="card-item-value">{{ item.creationTime }}</text>
      </view>
      <view class="card-item" v-if="allTxt.payTime">
        <text class="card-item-label">{{ '支付日期' }}:</text>
        <text class="card-item-value">{{ item.payTime }}</text>
      </view>
      <view class="card-item" v-if="allTxt.expireDate">
        <text class="card-item-label">有效期:</text>
        <text class="card-item-value">{{ item.expireDate }}</text>
      </view>
      <view class="card-item" v-if="allTxt.stopDate">
        <text class="card-item-label">休止日期:</text>
        <text class="card-item-value">{{ item.stopDate }}</text>
      </view>
      <view class="card-item">
        <text class="card-item-label">会员状态:</text>
        <text class="card-item-value">{{ item.expireStatusVal }}</text>
      </view>
      <view class="card-item" v-if="allTxt.changeNumber">
        <text class="card-item-label">{{ '变更次数' }}:</text>
        <text class="card-item-value">{{ item.changeNumber }}</text>
      </view>
      <view class="card-item" v-if="allTxt.directPushNumber">
        <text class="card-item-label">{{ '修改直推次数' }}:</text>
        <text class="card-item-value">{{ item.directPushNumber }}</text>
      </view>
      <view class="card-item">
        <text class="card-item-label">{{ '会员类型' }}:</text>
        <text class="card-item-value">{{ item.categoryVal }}</text>
      </view>
    </view>
    <!-- 侧边弹框 -->
    <u-popup :show="isFont" mode="right" @close="isFont = false">
      <view class="che">
        <u-checkbox-group
          v-model="selectAll"
          @change="getAll"
          placement="column"
          activeColor="#ED1D25"
        >
          <u-checkbox
            :customStyle="{ marginBottom: '8px' }"
            v-for="(item, index) in allList"
            :key="index"
            :label="item.text"
            :name="item.id"
          >
          </u-checkbox>
        </u-checkbox-group>
        <u-checkbox-group
          v-model="selected"
          @change="getMenu"
          placement="column"
          activeColor="#ED1D25"
        >
          <u-checkbox
            :customStyle="{ marginBottom: '8px' }"
            v-for="(item, index) in menuList"
            :key="index"
            v-show="index != 0"
            :label="item.text"
            :name="item.id"
          >
          </u-checkbox>
        </u-checkbox-group>
      </view>
    </u-popup>
    <!-- 顶部搜索 -->
    <u-popup :show="isTop" mode="top" @close="isTop = false">
      <view class="tt">
        <u--form
          labelPosition="left"
          labelWidth="auto"
          :model="select"
          ref="uForm"
        >
          <u-row gutter="10" style="flex-wrap: wrap">
            <u-col span="6">
              <u-form-item :label="'会员编号'">
                <u--input fontSize="12" v-model="select.memberCode"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'会员姓名'">
                <u--input fontSize="12" v-model="select.memberName"></u--input>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'联系方式'">
                <u--input fontSize="12" v-model="select.phone"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'变更次数'">
                <u--input
                  fontSize="12"
                  v-model="select.changeNumber"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'注册等级'">
                <picker
                  :range="gradeRangList"
                  range-key="gradeName"
                  @change="bindPickerChange1"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.pkRegisterGradeVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'结算等级'">
                <picker
                  :range="gradeRangList"
                  range-key="gradeName"
                  @change="bindPickerChange2"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.pkSettleGradeVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'荣誉奖衔'">
                <picker
                  :range="awardsList"
                  range-key="awardsName"
                  @change="bindPickerChange3"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.pkAwardsVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'隶属体系'">
                <picker
                  :range="vertexList"
                  range-key="vertexName"
                  @change="bindPickerChange4"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.vertexIdVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'隶属团队'">
                <picker
                  :range="memberteamList"
                  range-key="teamName"
                  @change="bindPickerChange5"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.teamIdVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'注册权限'">
                <picker
                  :range="registerList"
                  range-key="label"
                  @change="bindPickerChange6"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.registerAuthorityVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'账户状态'">
                <picker
                  :range="accountStatus"
                  range-key="label"
                  @change="bindPickerChange7"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.accountStatusVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'钱包状态'">
                <picker
                  :range="salletStatus"
                  range-key="label"
                  @change="bindPickerChange8"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.memberAccountVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'实名认证'">
                <picker
                  :range="tattestation"
                  range-key="label"
                  @change="bindPickerChange10"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.isRealNameVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item label="服务协议">
                <picker
                  :range="serviceList"
                  range-key="label"
                  @change="bindPickerChange17"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.serviceAgreementVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'订单类型'">
                <picker
                  :range="orderStatusList"
                  range-key="label"
                  @change="bindPickerChange12"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.orderSourceVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'服务中心编号'">
                <u--input
                  fontSize="12"
                  v-model="select.centerMemberCode"
                ></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'服务中心姓名'">
                <u--input
                  fontSize="12"
                  v-model="select.centerMemberName"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'推荐编号'">
                <u--input
                  fontSize="12"
                  v-model="select.parMemberCode"
                ></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'推荐姓名'">
                <u--input
                  fontSize="12"
                  v-model="select.parMemberName"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'安置编号'">
                <u--input
                  fontSize="12"
                  v-model="select.placeMemberCode"
                ></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'安置姓名'">
                <u--input
                  fontSize="12"
                  v-model="select.placeMemberName"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="6">
              <u-form-item :label="'修改直推次数'">
                <u--input
                  fontSize="12"
                  v-model="select.directPushNumber"
                ></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'收益状态'">
                <picker
                  :range="incomeStatusListd"
                  range-key="label"
                  @change="bindPickerChange16"
                >
                  <u--input
                    disabled
                    fontSize="12"
                    disabledColor="#ffffff"
                    v-model="select.incomeStatusVal"
                    suffixIcon="arrow-down"
                    suffixIconStyle="font-size: 12px;"
                  ></u--input>
                </picker>
              </u-form-item>
            </u-col>

            <u-col span="12">
              <u-form-item
                :label="'创建日期'"
                @click="(isData = true), (setTime = 0)"
              >
                <u--input
                  disabled
                  fontSize="12"
                  disabledColor="#ffffff"
                  v-model="select.creationTimeVal"
                  suffixIcon="arrow-down"
                  suffixIconStyle="font-size: 12px;"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="12">
              <u-form-item
                :label="'支付日期'"
                @click="(isData = true), (setTime = 1)"
              >
                <u--input
                  disabled
                  fontSize="12"
                  disabledColor="#ffffff"
                  v-model="select.payVal"
                  suffixIcon="arrow-down"
                  suffixIconStyle="font-size: 12px;"
                ></u--input>
              </u-form-item>
            </u-col>

            <u-col span="12">
              <u-form-item
                :label="'到期日期'"
                @click="(isData = true), (setTime = 2)"
              >
                <u--input
                  disabled
                  fontSize="12"
                  disabledColor="#ffffff"
                  v-model="select.dqsj"
                  suffixIcon="arrow-down"
                  suffixIconStyle="font-size: 12px;"
                ></u--input>
              </u-form-item>
            </u-col>
          </u-row>
        </u--form>
        <view class="footer">
          <u-button
            @click="getList1"
            color="#C8161D"
            text="搜索"
            class="btnn"
          ></u-button>
          <u-button @click="reset" text="重置"></u-button>
        </view>
      </view>
    </u-popup>
    <u-calendar
      @close="isData = false"
      :closeOnClickOverlay="true"
      :show="isData"
      :allowSameDay="true"
      mode="range"
      :maxDate="calendar.maxDate"
      :minDate="calendar.minDate"
      :monthNum="calendar.monthNum"
      @confirm="confirm"
    ></u-calendar>
    <!-- 悬浮球 -->
    <drag-button />
    <export-ball
      ref="exportBall"
      v-hasButtons="['MemberExport']"
      @handleExport="handleExport"
    />
  </view>
</template>

<script>
  import * as api from '@/api/information';
  import { isLocals, isLocalSymbol } from '@/util/numberToCurrency';
  export default {
    data() {
      return {
        select: {},
        isTop: false,
        isData: false,
        selectAll: [0],
        selected: [],
        isFont: false,
        total: 0,
        queryParams: {
          pageNum: 1,
          pageSize: 20,
        },
        tableData: [],
        allList: [
          {
            id: 0,
            text: '全选',
            checked: false,
          },
        ],
        menuList: [
          {
            id: 0,
            text: '全选',
            checked: false,
          },
          {
            id: 1,
            text: '推荐编号',
            checked: false,
            prop: 'parMemberCode',
          },
          {
            id: 2,
            text: '推荐姓名',
            checked: false,
            prop: 'parMemberName',
          },
          {
            id: 3,
            text: '安置编号',
            checked: false,
            prop: 'placeMemberName',
          },
          {
            id: 4,
            text: '安置姓名',
            checked: false,
            prop: 'placeMemberName',
          },
          {
            id: 5,
            text: '服务中心编号',
            checked: false,
            prop: 'centerMemberCode',
          },
          {
            id: 6,
            text: '服务中心姓名',
            checked: false,
            prop: 'centerMemberName',
          },
          {
            id: 7,
            text: '注册等级',
            checked: false,
            prop: 'pkRegisterGradeVal',
          },
          {
            id: 8,
            text: '结算等级',
            checked: false,
            prop: 'pkSettleGradeVal',
          },
          {
            id: 9,
            text: '注册金额',
            checked: false,
            prop: 'consumeMoney',
          },
          {
            id: 10,
            text: '注册业绩',
            checked: false,
            prop: 'consumeAchieve',
          },
          {
            id: 11,
            text: '隶属体系',
            checked: false,
            prop: 'vertexName',
          },
          {
            id: 12,
            text: '隶属团队',
            checked: false,
            prop: 'teamName',
          },
          {
            id: 14,
            text: '实名认证',
            checked: false,
            prop: 'isRealNameVal',
          },
          {
            id: 19,
            text: '账户状态',
            checked: false,
            prop: 'accountStatusVal',
          },
          {
            id: 20,
            text: '钱包状态',
            checked: false,
            prop: 'memberAccountVal',
          },
          {
            id: 'registerAuthorityVal',
            text: '注册权限',
            checked: false,
            prop: 'registerAuthorityVal',
          },
        ],
        allTxt: {},
        gradeRangList: [],
        awardsList: [],
        vertexList: [],
        memberteamList: [],
        registerList: [],
        salletStatus: [],
        accountStatus: [],
        tattestation: [],
        lecturerLevel: [],
        orderStatusList: [],
        incomeStatusListd: [],
        serviceList: [],
        calendar: {
          minDate: '',
          maxDate: '',
          monthNum: 25,
        },
      };
    },
    onLoad(options) {
      // 查询会员信息
      this.getMemberList();
      // 获取字段权限
      this.getUserRole();
      // 获取下拉
      this.getData();
      this.chooseTimed();
      this.getAll([0]);
    },
    onReachBottom() {
      this.queryParams.pageNum++;
      this.getMemberList();
    },
    methods: {
      getColumnVisible(columnName) {
        return !!this.menuList.find((item) => item.prop === columnName)
          ?.checked;
      },
      isLocalSymbol,
      isLocals,
      // 设置默认日期，最大值为今天，最小值为去年今天
      chooseTimed() {
        const date = new Date();
        const year = date.getFullYear();
        let month = date.getMonth() + 1;
        let day = date.getDate();
        if (month <= 9) {
          month = '0' + month;
        }
        if (day <= 9) {
          day = '0' + day;
        }
        const minyear = year - 1;
        const maxyear = year + 1;
        this.calendar.minDate = minyear + '-' + month + '-' + day;
        this.calendar.maxDate = maxyear + '-' + month + '-' + day;
      },
      getData() {
        // 注册等级下拉选
        api.getgradeRanglist().then((res) => {
          this.gradeRangList = res.data;
        });
        // 荣誉奖衔下拉选
        api.getAwardsListChiose().then((res) => {
          this.awardsList = res.rows;
        });
        // 隶属体系下拉选
        api.getvertexValue().then((res) => {
          this.vertexList = res.data;
        });
        // 隶属团队下拉选
        api.getmemberTeamList().then((res) => {
          this.memberteamList = res.rows;
        });
        // 注册权限下拉选
        api.getRegistration().then((res) => {
          this.registerList = res.data;
        });
        // 钱包状态下拉选
        api.getsalletStatus().then((res) => {
          this.salletStatus = res.data;
        });
        // 账户状态下拉选
        api.getaccountStatus().then((res) => {
          this.accountStatus = res.data;
        });

        // //认证下拉选
        api.getattestation().then((res) => {
          this.tattestation = res.data;
        });
        // 订单状态下拉选
        api.getorderStatus().then((res) => {
          this.orderStatusList = res.data;
        });
        // 订单状态下拉选
        api.getorderStatus().then((res) => {
          this.orderStatusList = res.data;
        });
        // 收益状态
        api.incomeStatusList().then((res) => {
          this.incomeStatusListd = res.data;
        });
        // 服务协议
        api.serviceStatus().then((res) => {
          this.serviceList = res.data;
        });
      },
      // 全选
      getAll(e) {
        if (e.length > 0) {
          this.menuList.forEach((item) => {
            this.$set(item, 'checked', true);
            this.selected.push(item.id);
          });
        } else {
          this.menuList.forEach((item) => {
            this.$set(item, 'checked', false);
          });
          this.$set(this, 'selected', []);
        }
      },
      // 单选
      getMenu(e) {
        console.log(
          '%c [ e ]-834',
          'font-size:13px; background:#0e8eca; color:#52d2ff;',
          e
        );
        console.log(
          '%c [ e ]-834',
          'font-size:13px; background:#0e8eca; color:#52d2ff;',
          this.menuList
        );
        this.menuList.forEach((item) => {
          this.$set(item, 'checked', false);
          e.forEach((ctem) => {
            if (item.id == ctem) {
              this.$set(item, 'checked', true);
            }
          });
        });
        if (e.length == this.menuList.length) {
          this.$set(this, 'selectAll', [0]);
        } else {
          this.$set(this, 'selectAll', []);
        }
      },
      getUserRole() {
        api.getRoleMenu('Member').then((res) => {
          const obj = {};
          res.data.forEach((item) => {
            obj[item] = 1;
          });
          this.allTxt = obj;
        });
      },

      // 查询会员信息
      getMemberList() {
        api
          .getMemberList(Object.assign({}, this.queryParams, this.select))
          .then((res) => {
            this.total = res.total;
            this.tableData = this.tableData.concat(res.rows);
          });
      },
      getList1() {
        this.tableData = [];
        this.queryParams.pageNum = 1;
        this.isTop = false;
        this.getMemberList();
      },
      reset() {
        this.select = {};
      },
      handleExport() {
        const url = '/member/manager/member/export';
        const obj = Object.assign({}, this.select, this.queryParams);
        this.$refs.exportBall.handleExport(url, obj, '会员信息');
      },
      bindPickerChange1(e) {
        this.$set(
          this.select,
          'pkRegisterGradeVal',
          this.gradeRangList[e.detail.value].gradeName
        );
        this.$set(
          this.select,
          'pkRegisterGrade',
          this.gradeRangList[e.detail.value].pkId
        );
      },
      bindPickerChange2(e) {
        this.$set(
          this.select,
          'pkSettleGradeVal',
          this.gradeRangList[e.detail.value].gradeName
        );
        this.$set(
          this.select,
          'pkSettleGrade',
          this.gradeRangList[e.detail.value].pkId
        );
      },
      bindPickerChange3(e) {
        this.$set(
          this.select,
          'pkAwardsVal',
          this.awardsList[e.detail.value].awardsName
        );
        this.$set(
          this.select,
          'pkAwards',
          this.awardsList[e.detail.value].pkId
        );
      },
      bindPickerChange4(e) {
        this.$set(
          this.select,
          'vertexIdVal',
          this.vertexList[e.detail.value].vertexName
        );
        this.$set(
          this.select,
          'vertexId',
          this.vertexList[e.detail.value].pkId
        );
      },
      bindPickerChange5(e) {
        this.$set(
          this.select,
          'teamIdVal',
          this.memberteamList[e.detail.value].teamName
        );
        this.$set(
          this.select,
          'teamId',
          this.memberteamList[e.detail.value].pkId
        );
      },
      bindPickerChange6(e) {
        this.$set(
          this.select,
          'registerAuthorityVal',
          this.registerList[e.detail.value].label
        );
        this.$set(
          this.select,
          'registerAuthority',
          this.registerList[e.detail.value].value
        );
      },
      bindPickerChange7(e) {
        this.$set(
          this.select,
          'accountStatusVal',
          this.accountStatus[e.detail.value].label
        );
        this.$set(
          this.select,
          'accountStatus',
          this.accountStatus[e.detail.value].value
        );
      },
      bindPickerChange8(e) {
        this.$set(
          this.select,
          'memberAccountVal',
          this.salletStatus[e.detail.value].label
        );
        this.$set(
          this.select,
          'memberAccount',
          this.salletStatus[e.detail.value].value
        );
      },
      bindPickerChange10(e) {
        this.$set(
          this.select,
          'isRealNameVal',
          this.tattestation[e.detail.value].label
        );
        this.$set(
          this.select,
          'isRealName',
          this.tattestation[e.detail.value].value
        );
      },
      bindPickerChange11(e) {
        this.$set(
          this.select,
          'lecturerLevelVal',
          this.lecturerLevel[e.detail.value].label
        );
        this.$set(
          this.select,
          'lecturerLevel',
          this.lecturerLevel[e.detail.value].value
        );
      },
      bindPickerChange12(e) {
        this.$set(
          this.select,
          'orderSourceVal',
          this.orderStatusList[e.detail.value].label
        );
        this.$set(
          this.select,
          'orderSource',
          this.orderStatusList[e.detail.value].value
        );
      },
      bindPickerChange13(e) {
        this.$set(
          this.select,
          'isDealerVal',
          this.tattestation[e.detail.value].label
        );
        this.$set(
          this.select,
          'isDealer',
          this.tattestation[e.detail.value].value
        );
      },
      bindPickerChange14(e) {
        this.$set(
          this.select,
          'superStudioVal',
          this.tattestation[e.detail.value].label
        );
        this.$set(
          this.select,
          'superStudio',
          this.tattestation[e.detail.value].value
        );
      },
      bindPickerChange15(e) {
        this.$set(
          this.select,
          'isMakerSpaceVal',
          this.tattestation[e.detail.value].label
        );
        this.$set(
          this.select,
          'isMakerSpace',
          this.tattestation[e.detail.value].value
        );
      },
      bindPickerChange16(e) {
        this.$set(
          this.select,
          'incomeStatusVal',
          this.incomeStatusListd[e.detail.value].label
        );
        this.$set(
          this.select,
          'incomeStatus',
          this.incomeStatusListd[e.detail.value].value
        );
      },
      bindPickerChange17(e) {
        this.$set(
          this.select,
          'serviceAgreementVal',
          this.serviceList[e.detail.value].label
        );
        this.$set(
          this.select,
          'serviceAgreement',
          this.serviceList[e.detail.value].value
        );
      },
      confirm(e) {
        if (this.setTime == 0) {
          this.$set(this.select, 'startDate', e[0]);
          this.$set(this.select, 'endDate', e[e.length - 1]);
          this.$set(
            this.select,
            'creationTimeVal',
            e[0] + ' 至 ' + e[e.length - 1]
          );
        } else if (this.setTime == 1) {
          this.$set(this.select, 'startDatePay', e[0]);
          this.$set(this.select, 'endDatePay', e[e.length - 1]);
          this.$set(this.select, 'payVal', e[0] + ' 至 ' + e[e.length - 1]);
        } else if (this.setTime == 2) {
          this.$set(this.select, 'startExpireDate', e[0]);
          this.$set(this.select, 'endExpireDate', e[e.length - 1]);
          this.$set(this.select, 'dqsj', e[0] + ' 至 ' + e[e.length - 1]);
        }

        this.isData = false;
      },
    },
  };
</script>

<style lang="scss" scoped>
  .content {
    background: #f9f9f9;
    // padding: 20rpx;
  }
  .header_a {
    position: fixed;
    width: 100%;
  }
  .header {
    margin: 20rpx;
    background: #ffffff;
    box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.4);
    border-radius: 10px 10px 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30rpx 40rpx;
    img {
      width: 24px;
      height: 24px;
    }
  }
  .zhan {
    height: 130rpx;
  }
  .member-card {
    background: #ffffff;
    border-radius: 10px;
    margin: 20rpx;
    padding: 20rpx;
    box-shadow: 0px 2px 10px 0px rgba(204, 204, 204, 0.4);
  }

  .card-item {
    display: flex;
    justify-content: space-between;
    padding: 10rpx 0;
    font-size: 12px;
    font-family: PingFang SC-Medium, PingFang SC;
    border-bottom: 1rpx solid #f0f0f0; /* Optional: adds a separator line between items */
  }

  .card-item:last-child {
    border-bottom: none; /* Optional: removes separator for the last item */
  }

  .card-item-label {
    font-weight: 500;
    color: #999;
    margin-right: 10rpx;
    flex-shrink: 0; /* Prevents label from shrinking */
  }

  .card-item-value {
    color: #333333;
    text-align: right;
    word-break: break-all; /* Allows long values to wrap */
  }

  .che {
    padding: 20rpx 40rpx;
  }
  .tt {
    padding: 20rpx;
    // margin-top: 40rpx;
  }
  ::v-deep .u-transition {
    z-index: 998 !important;
  }
  .footer {
    display: flex;
    align-items: center;
    padding: 20rpx 60rpx;
    .btnn {
      margin-right: 40rpx;
    }
  }
  ::v-deep .u-input {
    padding: 0 9px !important;
  }
  ::v-deep .u-form-item__body__left__content__label {
    font-size: 12px;
  }
  ::v-deep .u-form-item__body {
    padding: 5px 0;
  }
</style>
