<!--
 * @Descripttion: 
 * @version: 
 * @Author: 王三华
 * @Date: 2023-10-09 15:37:13
-->
<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="kuang"
          v-for="(item,index) in tableData"
          :key="index">
      <table class="tftable"
             border="1">
        <tr v-if="allTxt.memberCode">
          <td align="right">{{ '会员编号' }}</td>
          <td align="left">{{ item.memberCode }}</td>
        </tr>
        <tr v-if="allTxt.memberName">
          <td align="right">{{ '会员姓名' }}</td>
          <td align="left">{{ item.memberName }}</td>
        </tr>
        <tr v-if="allTxt.vertexName">
          <td align="right">{{ '隶属体系' }}</td>
          <td align="left">{{ item.vertexName }}</td>
        </tr>
        <tr v-if="allTxt.teamName">
          <td align="right">{{ '隶属团队' }}</td>
          <td align="left">{{ item.teamName }}</td>
        </tr>

        <tr v-if="allTxt.period">
          <td align="right">{{ '结算期数' }}</td>
          <td align="left">{{ item.period }}</td>
        </tr>
        <tr v-if="allTxt.settleDate">
          <td align="right">{{ '结算日期' }}</td>
          <td align="left">{{ item.settleDate }}</td>
        </tr>
        <tr v-if="allTxt.directIncomeOri">
          <td align="right">{{ '直推收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.directIncomeOri }}</td>
        </tr>
        
        <tr v-if="allTxt.expandIncomeOri">
          <td align="right">{{ '拓展收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.expandIncomeOri }}</td>
        </tr>
        
        <tr v-if="allTxt.coachIncomeOri">
          <td align="right">{{ '辅导收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.coachIncomeOri }}</td>
        </tr>
        
        <tr v-if="allTxt.shareIncomeOri">
          <td align="right">{{ '分红收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.shareIncomeOri }}</td>
        </tr>
        
        <tr v-if="allTxt.serviceIncomeOri">
          <td align="right">{{ '报单收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.serviceIncomeOri }}</td>
        </tr>
        
      
        
        <tr v-if="allTxt.repurRangeIncomeOri">
          <td align="right">{{ '复购级差收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurRangeIncomeOri }}</td>
        </tr>

        <tr v-if="allTxt.repurExpandIncomeOri">
          <td align="right">{{ '复购拓展收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurExpandIncomeOri }}</td>
        </tr>
        
        <tr v-if="allTxt.repurCoachIncome">
          <td align="right">{{ '复购辅导收益' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurCoachIncome }}</td>
        </tr>
        <tr v-if="allTxt.repurCouponOri">
          <td align="right">{{ '复购券' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurCouponOri }}</td>
        </tr>
        
        <tr v-if="allTxt.repurCouponShareOri">
          <td align="right">{{ '复购券均分' }}</td>
          <td align="left">{{ item.repurCouponShareOri }}</td>
        </tr>
        
        <tr v-if="allTxt.backPointsOri">
          <td align="right">{{ '商城重消' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.backPointsOri }}</td>
        </tr>
        
        <tr v-if="allTxt.serviceSpendOri">
          <td align="right">{{ '平台服务费' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.serviceSpendOri }}</td>
        </tr>
        
        <tr v-if="allTxt.globalPointsOri">
          <td align="right">直推级差({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.globalPointsOri }}</td>
        </tr>
        
        <tr v-if="allTxt.carAwardPointsOri">
          <td align="right">{{ '车奖积分' }}</td>
          <td align="left">{{ item.carAwardPointsOri }}</td>
        </tr>
        
        <tr v-if="allTxt.purRealSubtotalOri">
          <td align="right">{{ '首购实发小计' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.purRealSubtotalOri }}</td>
        </tr>
        
        <tr v-if="allTxt.repurRealSubtotalOri">
          <td align="right">{{ '复购实发小计' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurRealSubtotalOri }}</td>
        </tr>

        <tr v-if="allTxt.repurCouponSubtotalOri">
          <td align="right">{{ '复购券实发小计' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.repurCouponSubtotalOri }}</td>
        </tr>
        
        <tr v-if="allTxt.realIncomeTotalOri">
          <td align="right">{{ '实发收益总计' }}({{isLocalSymbol()  }})</td>
          <td align="left">{{ item.realIncomeTotalOri }}</td>
        </tr>

      </table>
    </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>
    <!-- 小计 -->
    <view class="table_all">
      <u-button @click="isBtm=true"
                size="small"
                color="rgba(243, 169, 0, 1)"
                :text="'小计'"></u-button>
    </view>
    <!-- 小计弹框 -->
    <u-popup :show="isBtm"
             mode="bottom"
             :closeable="true"
             @close="isBtm=false">
      <view class="pop">
        <view class="kuang"
              v-for="(item,index) in totalPrice"
              :key="index">
          <table class="tftable"
                 border="1">
            <!-- <tr v-if="allTxt.memberCode">
              <td align="right">{{ '会员编号' }}</td>
              <td align="left">{{ item.memberCode }}</td>
            </tr>
            <tr v-if="allTxt.memberName">
              <td align="right">{{ '会员姓名' }}</td>
              <td align="left">{{ item.memberName }}</td>
            </tr>
            <tr v-if="allTxt.vertexName">
              <td align="right">{{ '隶属体系' }}</td>
              <td align="left">{{ item.vertexName }}</td>
            </tr>
            <tr v-if="allTxt.teamName">
              <td align="right">{{ '隶属团队' }}</td>
              <td align="left">{{ item.teamName }}</td>
            </tr>

            <tr v-if="allTxt.period">
              <td align="right">{{ '结算期数' }}</td>
              <td align="left">{{ item.period }}</td>
            </tr>
            <tr v-if="allTxt.settleDate">
              <td align="right">{{ '结算日期' }}</td>
              <td align="left">{{ item.settleDate }}</td>
            </tr> -->
            <tr v-if="allTxt.directIncomeOri">
              <td align="right">{{ '直推收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.directIncomeOri }}</td>
            </tr>
            
            <tr v-if="allTxt.expandIncomeOri">
              <td align="right">{{ '拓展收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.expandIncomeOri }}</td>
            </tr>
            
            <tr v-if="allTxt.coachIncomeOri">
              <td align="right">{{ '辅导收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.coachIncomeOri }}</td>
            </tr>
            
            <tr v-if="allTxt.shareIncomeOri">
              <td align="right">{{ '分红收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.shareIncomeOri }}</td>
            </tr>
            
            <tr v-if="allTxt.serviceIncomeOri">
              <td align="right">{{ '报单收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.serviceIncomeOri }}</td>
            </tr>
            
            <tr v-if="allTxt.repurPushIncomeOri">
              <td align="right">{{ '复购推荐收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurPushIncomeOri }}</td>
            </tr>

            <tr v-if="allTxt.repurRangeIncomeOri">
              <td align="right">{{ '复购级差收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurRangeIncomeOri }}</td>
            </tr>

            <tr v-if="allTxt.repurExpandIncomeOri">
              <td align="right">{{ '复购拓展收益' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurExpandIncomeOri }}</td>
            </tr>

            

            <tr v-if="allTxt.repurCouponOri">
              <td align="right">{{ '复购券' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurCouponOri }}</td>
            </tr>
            
            <tr v-if="allTxt.repurCouponShareOri">
              <td align="right">{{ '复购券均分' }}</td>
              <td align="left">{{ item.repurCouponShareOri }}</td>
            </tr>
            
            <tr v-if="allTxt.backPointsOri">
              <td align="right">{{ '商城重消' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.backPointsOri }}</td>
            </tr>
            
            <tr v-if="allTxt.serviceSpendOri">
              <td align="right">{{ '平台服务费' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.serviceSpendOri }}</td>
            </tr>
            <tr v-if="allTxt.globalPointsOri">
              <td align="right">直推级差({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.globalPointsOri }}</td>
            </tr>
            
            <tr v-if="allTxt.carAwardPointsOri">
              <td align="right">{{ '车奖积分' }}</td>
              <td align="left">{{ item.carAwardPointsOri }}</td>
            </tr>
            <tr v-if="allTxt.purRealSubtotalOri">
              <td align="right">{{ '首购实发小计' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.purRealSubtotalOri }}</td>
            </tr>
            
            <tr v-if="allTxt.repurRealSubtotalOri">
              <td align="right">{{ '复购实发小计' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurRealSubtotalOri }}</td>
            </tr>

            
            <tr v-if="allTxt.repurCouponSubtotalOri">
              <td align="right">{{ '复购券实发小计' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.repurCouponSubtotalOri }}</td>
            </tr>
        
            
            <tr v-if="allTxt.realIncomeTotalOri">
              <td align="right">{{ '实发收益总计' }}({{isLocalSymbol()  }})</td>
              <td align="left">{{ item.realIncomeTotalOri }}</td>
            </tr>

            <tr v-if="menuList[17].checked==true &&allTxt.realIncomeTotal">
              <td align="right">{{ '实发收益总计' }}($)</td>
              <td align="left">{{ item.realIncomeTotal }}</td>
            </tr>
          </table>
        </view>
      </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">
            <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-row>
          <u-row gutter="10">
            <u-col span="6">
              <u-form-item :label="'结算期数'">
                <u--input fontSize="12"
                          v-model="select.memberSettlePeriodId"></u--input>
              </u-form-item>
            </u-col>
            <!-- <u-col span="6">
              <u-form-item :label="'币种展示'">
                <picker :range="acList"
                        range-key="label"
                        @change="bindPickerChange1">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.pkCurrencyVal"
                            suffixIcon="arrow-down"
                            suffixIconStyle="font-size: 12px;"></u--input>
                </picker>
              </u-form-item>
            </u-col> -->
          </u-row>
          <u-row gutter="10">
            <u-col span="12">
              <u-form-item label="结算日期"
                           @click="isData=true">
                <u--input disabled
                          fontSize="12"
                          disabledColor="#ffffff"
                          v-model="select.operationTimeVal"
                          suffixIcon="arrow-down"
                          suffixIconStyle="font-size: 12px;"></u--input>
              </u-form-item>
            </u-col>
          </u-row>
          <u-row gutter="10">
            <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-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="['BonusDetailExport']"
                 @handleExport="handleExport" />
  </view>
</template>

<script>
import * as api from '@/api/settle'
import * as infor from '@/api/information'
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency'
export default {
  data() {
    return {
      select: {},
      isTop: false,
      isData: false,
      isFont: false,
      selectAll: [0],
      selected: [],
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 20,
      },
      tableData: [],
      allList: [
        {
          id: 0,
          text: '全选',
          checked: false,
        },
      ],
      menuList: [
        {
          id: 0,
          text: '全选',
          checked: true,
        },
        {
          id: 21,
          text: '直推收益' + '($)',
          checked: true,
          prop: 'firstBuyAmountDollar',
        },
        {
          id: 22,
          text: '拓展收益' + '($)',
          checked: true,
          prop: 'expandIncome',
        },
        {
          id: 23,
          text: '辅导收益' + '($)',
          checked: true,
          prop: 'coachIncome',
        },
        {
          id: 24,
          text: '分红收益' + '($)',
          checked: true,
          prop: 'shareIncome',
        },
        {
          id: 25,
          text: '报单收益' + '($)',
          checked: true,
          prop: 'serviceIncome',
        },
        {
          id: 26,
          text: '云代直推收益' + '($)',
          checked: true,
          prop: 'cloudDirectIncome',
        },
        {
          id: 27,
          text: '云代首购收益' + '($)',
          checked: true,
          prop: 'cloudPurIncome',
        },
        {
          id: 28,
          text: '云代复购收益' + '($)',
          checked: true,
          prop: 'cloudRepurIncome',
        },
        {
          id: 39,
          text: '复购级差收益' + '($)',
          checked: true,
          prop: 'repurRangeIncome',
        },
        {
          id: 30,
          text: '复购拓展收益' + '($)',
          checked: true,
          prop: 'repurExpandIncome',
        },
        {
          id: 31,
          text: '复购券',
          checked: true,
          prop: 'repurCoupon',
          flag: 1,
        },
        {
          id: 32,
          text: '商城重消' + '($)',
          checked: true,
          prop: 'backPoints',
        },
        {
          id: 35,
          text: '平台服务费' + '($)',
          checked: true,
          prop: 'backPoints',
        },
        {
          id: 44,
          text: '首购实发小计' + '($)',
          checked: true,
          prop: 'purRealSubtotal',
        },
        {
          id: 45,
          text: '云代实发小计' + '($)',
          checked: true,
          prop: 'cloudRealSubtotal',
        },
        {
          id: 46,
          text: '复购实发小计' + '($)',
          checked: true,
          prop: 'repurRealSubtotal',
        },
        {
          id: 47,
          text: '实发收益总计' + '($)',
          checked: true,
          prop: 'realIncomeTotal',
        },
      ],
      allTxt: {},
      vertexList: [],
      memberteamList: [],
      cardList: [],
      calendar: {
        minDate: '',
        maxDate: '',
        monthNum: 25,
      },
      minDate: '',
      todayData: '',
      acList: [],
      verList: [],
      settleDate: '',
      totalPrice: [],
      isBtm: false,
    }
  },
  onLoad(options) {
    this.settleDate = options.settleDate || ''
    console.log(
      '%c [ this.settleDate ]-532',
      'font-size:13px; background:#40a0a3; color:#84e4e7;',
      this.settleDate
    )
    // 获取字段权限
    this.getUserRole()
    // 获取下拉
    this.getData()
    this.chooseTimed()
    if (this.settleDate) {
      this.$set(this.select, 'startDate', this.settleDate)
      this.$set(this.select, 'endDate', this.settleDate)
      this.$set(
        this.select,
        'operationTimeVal',
        this.settleDate + ' 至 ' + this.settleDate
      )
    } else {
      var s1 = this.getStartTime()
      var s2 = this.getEndTime()
      this.$set(this.select, 'startDate', s1)
      this.$set(this.select, 'endDate', s2)
      this.$set(this.select, 'operationTimeVal', s1 + ' 至 ' + s2)
    }
    this.getAll([0])
    this.todayData = Date.now()
    this.minDate = Number(new Date('1950-01-01'))
    this.getList()
  },
  onReachBottom() {
    this.queryParams.pageNum++
    this.getList()
  },
  methods: {
    isLocalSymbol,
    isLocals,
    getStartTime() {
      let date = new Date()
      let year = date.getFullYear() // 得到当前年份
      let month = date.getDate() === 1 ? date.getMonth() : date.getMonth() + 1 // 得到当前月份（0-11月份，+1是当前月份）
      date.setDate(1) // 将当前时间的日期设置成第一天
      month = month >= 10 ? month : '0' + month // 补零
      let day = date.getDate() // 得到当前天数，实际是本月第一天，因为前面setDate(1) 设置过了
      day = day >= 10 ? day : '0' + day // 补零
      return year + '-' + month + '-' + day
    },
    getEndTime() {
      var date = new Date()
      var year = date.getFullYear() // 年
      let month = date.getDate() === 1 ? date.getMonth() : date.getMonth() + 1 // 得到当前月份（0-11月份，+1是当前月份）
      var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate() // 日
      let day1 = date.getDate()
      // 给一位数的数据前面加 “0”
      if (month >= 1 && month <= 9) {
        month = '0' + month
      }
      if (day >= 0 && day <= 9) {
        day = '0' + day
      }
      if (day1 == 1) {
        var date2 = new Date()
        var year2 = date2.getFullYear()
        var month2 = date2.getMonth()
        var dates = new Date(year2, month2, 0).getDate()
        day = dates
      }
      return year + '-' + month + '-' + day
    },
    // 设置默认日期，最大值为今天，最小值为去年今天
    chooseTimed() {
      let date = new Date()
      let year = date.getFullYear()
      let month = date.getMonth() + 1
      let day = date.getDate()
      if (month <= 9) {
        month = '0' + month
      }
      if (day <= 9) {
        day = '0' + day
      }
      let minyear = year - 1
      let maxyear = year + 1
      this.calendar.minDate = minyear + '-' + month + '-' + day
      this.calendar.maxDate = maxyear + '-' + month + '-' + day
    },
    getData() {
      api.accountList().then((res) => {
        this.acList = res.data
      })
      // 隶属体系下拉选
      infor.getvertexValue().then((res) => {
        this.vertexList = res.data
      })
      //隶属团队下拉选
      infor.getmemberTeamList().then((res) => {
        this.memberteamList = res.rows
      })
    },
    // 全选
    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) {
      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() {
      infor.getRoleMenu('BonusDetail').then((res) => {
        let obj = {}
        res.data.forEach((item) => {
          obj[item] = 1
        })
        this.allTxt = obj
      })
    },
    
    //查询会员信息
    getList() {
      api
        .queryBonusDetail(Object.assign({}, this.queryParams, this.select))
        .then((res) => {
          this.total = res.total
          this.tableData = this.tableData.concat(res.rows)
          let obj = {}
          this.tableData.forEach((item) => {
            for (let key in item) {
              if (
                key != 'memberCode' &&
                key != 'memberName' &&
                key != 'vertexName' &&
                key != 'teamName' &&
                key != 'period' &&
                key != 'settleDate'
              ) {
                let value = Number(item[key])
                key in obj ? (obj[key] += value) : (obj[key] = value)
              }
            }
          })
          this.totalPrice = [obj]
        })
    },
    getList1() {
      this.tableData = []
      this.queryParams.pageNum = 1
      this.isTop = false
      this.getList()
    },
    reset() {
      this.select = {}
    },
    handleExport() {
      let url = '/bonus/manage/bonus/export-bonus-detail'
      let obj = Object.assign({}, this.select, this.queryParams)
      this.$refs.exportBall.handleExport(
        url,
        obj,
        `${'奖金明细'}-${new Date().getTime()}`
      )
    },
    bindPickerChange1(e) {
      this.$set(this.select, 'pkCurrencyVal', this.acList[e.detail.value].label)
      this.$set(this.select, 'pkCurrency', this.acList[e.detail.value].value)
    },
    bindPickerChange4(e) {
      this.$set(
        this.select,
        'vertexIdVal',
        this.vertexList[e.detail.value].vertexName
      )
      this.$set(this.select, 'pkVertex', this.vertexList[e.detail.value].pkId)
    },
    bindPickerChange5(e) {
      this.$set(
        this.select,
        'teamIdVal',
        this.memberteamList[e.detail.value].teamName
      )
      this.$set(
        this.select,
        'pkTeamCode',
        this.memberteamList[e.detail.value].pkId
      )
    },
    confirm(e) {
      this.$set(this.select, 'startDate', e[0])
      this.$set(this.select, 'endDate', e[e.length - 1])
      this.$set(
        this.select,
        'operationTimeVal',
        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;
}
.kuang {
  background: #f9f9f9;
  border-radius: 10px 10px 10px 10px;
  margin: 20rpx;
  padding-bottom: 40rpx;
}
.tftable {
  font-size: 12px;
  border-collapse: collapse;
  border-radius: 10px;
  width: 100%;
  background: #fff;
  border: 1px solid #f9f9f9;
  // margin-top: 20rpx;
  // border-right:1px solid #ccc;border-bottom:1px solid #F00;
  outline: none;
  td {
    font-size: 11px;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #999;
    padding: 20rpx 40rpx;
    width: 50%;
    // height: 60px;
    border-left: 1px solid #333;
    border-bottom: 1px solid #333;
  }
  td:nth-child(odd) {
    border-left: 1px solid #f9f9f9;
  }
  tr :nth-child(2) {
    color: #333333;
  }
}
.che {
  padding: 20rpx 40rpx;
}
.tt {
  padding: 20rpx;
  margin-top: 40px;
}
::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;
}
::v-deep .u-checkbox-group {
  flex-wrap: wrap;
  flex-shrink: inherit;
  .u-checkbox {
    margin-bottom: 10rpx;
  }
  uni-text {
    font-size: 12px !important;
    margin-right: 10rpx;
  }
  .u-icon__icon {
    margin-right: 0rpx;
  }
}
.table_all {
  position: fixed;
  bottom: 0;
  width: 100%;
}
.pop {
  padding: 40rpx;
  height: 60vh;
  overflow-y: auto;
  background: #f9f9f9;
}
</style>