<!--
 * @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 class="main">
      <el-form
        ref="select"
        :model="select"
        style="padding: 0px 10px 0px 0; background: #fff"
        label-width="100px"
      >
        <el-row>
          <!-- 一层 -->
          <el-col :span="4">
            <el-form-item :label="'订单编号'">
              <el-input v-model="select.orderCode" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item :label="'来源编号'">
              <el-input v-model="select.sourceMemberCode" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item :label="'来源姓名'">
              <el-input v-model="select.sourceMemberName" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item :label="'收益编号'">
              <el-input v-model="select.memberCode" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item :label="'收益姓名'">
              <el-input v-model="select.memberName" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item :label="'订单类型'">
              <el-select v-model="select.orderType" clearable placeholder="">
                <el-option
                  v-for="item in orderTypeList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-collapse-transition>
            <div v-show="isActive">
              <el-col :span="4">
                <el-form-item :label="'收益类型'">
                  <el-select
                    v-model="select.pkBonusItems"
                    clearable
                    placeholder=""
                  >
                    <el-option
                      v-for="item in yieldList"
                      :key="item.value"
                      :label="item.bonusName"
                      :value="item.pkId"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-form-item :label="$t('结算等级')">
                  <el-select v-model="select.pkGrade" clearable placeholder="">
                    <el-option
                      v-for="item in gradeRanglist"
                      :key="item.value"
                      :label="item.gradeName"
                      :value="item.pkId"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-form-item :label="'收益状态'">
                  <el-select
                    v-model="select.incomeStatus"
                    clearable
                    placeholder=""
                  >
                    <el-option
                      v-for="item in yieldStatus"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="4">
                <el-form-item :label="'隶属体系'">
                  <el-select v-model="select.pkVertex" clearable placeholder="">
                    <el-option
                      v-for="item in verList"
                      :key="item.value"
                      :label="item.vertexName"
                      :value="item.pkId"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <el-form-item :label="'隶属团队'">
                  <el-select
                    v-model="select.pkTeamCode"
                    clearable
                    placeholder=""
                  >
                    <el-option
                      v-for="item in memberList"
                      :key="item.value"
                      :label="item.teamName"
                      :value="item.pkId"
                    />
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="4">
                <el-form-item :label="'结算期数'">
                  <div style="display: flex">
                    <div>
                      <el-input v-model="select.period" clearable />
                    </div>
                    <!--                <span style="margin: 0 10px">至</span>-->
                    <!--                <div>-->
                    <!--                  <el-input v-model="select.endPeriod" clearable />-->
                    <!--                </div>-->
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item :label="'结算日期'">
                  <el-date-picker
                    v-model="creationTime"
                    value-format="yyyy-MM-dd"
                    format="yyyy-MM-dd"
                    type="datetimerange"
                    :range-separator="'至'"
                    :start-placeholder="'开始日期'"
                    :end-placeholder="'结束日期'"
                    @change="changeTime"
                  />
                </el-form-item>
              </el-col>
            </div>
          </el-collapse-transition>
          <el-col :span="4" style="margin-left: 30px">
            <el-button class="my_search" @click="getDataList">
              {{ '搜索' }}</el-button>
            <el-button class="my_reset" @click="reset">
              {{ '重置' }}</el-button>
          </el-col>
        </el-row>

        <div class="openClose" @click="changeActive">
          <i :class="isActive ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" />
          <div>{{ isActive ? '点击收起' : '点击展开' }}</div>
        </div>
      </el-form>
      <div class="maintop">
        <div class="mainbtn">
          <el-button
            v-has-buttons="['sourceBonusExport']"
            size="small"
            style="width: 68px"
            class="thebtn2"
            @click="handleExport"
          >
            {{ '导出' }}</el-button>
        </div>
        <!-- <div>
          <el-dropdown :hide-on-click="false">
            <span class="el-dropdown-link kuang">
              {{ '筛选字段'
              }}<i class="el-icon-arrow-down el-icon--right" />
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item v-for="item in menuList" :key="item.id">
                <el-checkbox
                  v-model="item.checked"
                  @change="getMenu($event, item.id)"
                >{{ item.text }}</el-checkbox></el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div> -->
      </div>
      <div class="maintable">
        <div>
          <el-table
            v-if="flag"
            ref="table"
            v-loading="loading"
            :height="isActive ? '615px' : '655px'"
            :data="tableData.censusSummaryList"
            style="width: 100%"
            :header-cell-style="{ background: '#EEEEEE' }"
            :row-class-name="tableRowClassName"
            :summary-method="getSummaries"
            show-summary
            @selection-change="handleSelectionChange"
          >
            <el-table-column type="selection" width="100" />
            <el-table-column
              v-if="dataList[0].key"
              align="center"
              prop="period"
              width="130"
              :label="'结算期数'"
            />
            <el-table-column
              v-if="dataList[1].key"
              align="center"
              prop="settleDate"
              width="130"
              :label="'结算日期'"
            />
            <el-table-column
              v-if="dataList[2].key"
              align="center"
              prop="orderCode"
              width="200"
              :label="'订单编号'"
            />
            <el-table-column
              v-if="dataList[3].key"
              align="center"
              prop="orderTypeVal"
              width="130"
              :label="'订单类型'"
            />

            <el-table-column
              v-if="dataList[5].key"
              align="center"
              prop="sourceMemberCode"
              width="130"
              :label="'来源编号'"
            />
            <el-table-column
              v-if="dataList[6].key"
              align="center"
              prop="sourceMemberName"
              width="130"
              :label="'来源姓名'"
            />
            <el-table-column
              v-if="dataList[7].key"
              align="center"
              prop="orderAmount"
              width="130"
              :label="'来源金额' + `(${isLocalSymbol()})`"
              :formatter="stateFormat"
            />
            <el-table-column
              v-if="dataList[8].key"
              align="center"
              prop="orderAchieveOri"
              width="130"
              :label="'来源业绩' + `(${isLocalSymbol()})`"
              :formatter="stateFormat"
            />

            <el-table-column
              v-if="dataList[12].key"
              align="center"
              prop="memberCode"
              width="130"
              :label="'收益编号'"
            />
            <el-table-column
              v-if="dataList[13].key"
              align="center"
              prop="memberName"
              width="130"
              :label="'收益姓名'"
            />
            <el-table-column
              v-if="dataList[14].key"
              align="center"
              prop="pkSettleGradeVal"
              width="130"
              :label="'结算等级'"
            />
            <el-table-column
              v-if="dataList[15].key"
              align="center"
              prop="pkAwardsVal"
              width="130"
              :label="'当月奖衔'"
            />
            <!--            <el-table-column-->
            <!--              v-for="item in menuList"-->
            <!--              v-if="item.checked&&item.id != 0&&item.id < 13"-->
            <!--              :key="item.id"-->
            <!--              align="center"-->
            <!--              width="130"-->
            <!--              :prop="item.prop"-->
            <!--              :label="item.text"-->
            <!--            />-->
            <el-table-column
              v-if="dataList[20].key"
              align="center"
              prop="currentGeneration"
              width="130"
              :label="'当前代数'"
            />
            <el-table-column
              v-if="dataList[21].key"
              align="center"
              prop="coachGeneration"
              width="130"
              :label="'辅导代数'"
            />

            <el-table-column
              v-if="dataList[26].key"
              align="center"
              prop="pretaxIncomeOri"
              width="130"
              :label="'税前收益' + `(${isLocalSymbol()})`"
              :formatter="stateFormat"
            />
            <el-table-column
              v-if="dataList[27].key"
              align="center"
              prop="realIncomeOri"
              width="130"
              :label="'实际收益' + `(${isLocalSymbol()})`"
              :formatter="stateFormat"
            />

            <el-table-column
              v-if="dataList[34].key"
              align="center"
              prop="bonusName"
              width="130"
              :label="'收益类型'"
            />
            <el-table-column
              v-if="dataList[35].key"
              align="center"
              prop="incomeStatusVal"
              width="130"
              :label="'收益状态'"
            />
            <el-table-column
              v-if="dataList[36].key"
              align="center"
              prop="vertexName"
              width="130"
              :label="'隶属体系'"
            />
            <el-table-column
              v-if="dataList[37].key"
              align="center"
              prop="teamName"
              width="130"
              :label="'隶属团队'"
            />
            <el-table-column
              v-if="dataList[38].key"
              align="center"
              prop="remark"
              width="700"
              :label="'奖金说明'"
              :show-overflow-tooltip="true"
            />
            <el-table-column
              v-if="dataList[39].key"
              align="center"
              prop="incomeRatio"
              width="130"
              :label="'收益占比' + '(%)'"
            />
            <el-table-column
              v-if="dataList[40].key"
              align="center"
              prop="incomeDialRatio"
              width="130"
              :label="'收益拨比' + '(%)'"
            />
            <el-table-column
              v-if="dataList[41].key"
              align="center"
              prop="orderDialRatio"
              width="130"
              :label="'订单拨比' + '(%)'"
            />
            <!--            <el-table-column align="center"-->
            <!--                             prop="time"-->
            <!--                             :label="'操作'" fixed="right" >-->
            <!--              <template slot-scope="scope">-->
            <!--                <el-button @click="toFixed(scope.row.pkId)"-->
            <!--                           type="text"-->
            <!--                           size="small">-->
            <!--                  修改-->
            <!--                </el-button>-->
            <!--                <el-button @click="toFixed(scope.row.pkId)"-->
            <!--                           type="text"-->
            <!--                           size="small">-->
            <!--                  查看-->
            <!--                </el-button>-->
            <!--                <el-button @click="handleDelete(scope.row.pkId)"-->
            <!--                           type="text"-->
            <!--                           size="small"-->
            <!--                           style="color: #c73030">-->
            <!--                  删除-->
            <!--                </el-button>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
          </el-table>
        </div>
        <!--        <div class="heji">-->
        <!--          <div-->
        <!--            v-for="item in menuList"-->
        <!--            v-if="item.checked&&item.id != 0&&item.id > 13"-->
        <!--            :key="item.id"-->
        <!--            class="dis"-->
        <!--          >-->
        <!--            <div>{{ item.text }}</div>-->
        <!--            <div>{{ tableData[item.prop] }}</div>-->
        <!--          </div>-->
        <!--        </div>-->
      </div>
    </div>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getDataList"
    />
  </div>
</template>

<script>
import topBar from '@/components/topBar'
import * as api from '@/api/settle.js'
import { classifyUpdate, classifySave } from '@/api/product'
import * as log from '@/api/logistics'
import { getcountryAllList } from '@/api/exchangerate'
import { bonusSource, exportBonusSouce } from '@/api/bonus'
import { isLocals, isLocalSymbol, stateFormat } from '@/utils/numberToCurrency'
import { getRoleMenu } from '@/api/notice'
export default {
  name: 'Bzpz',
  components: {
    topBar
  },
  filters: {
    isAgree(val) {
      if (!val) {
        return '允许'
      } else {
        return '禁止'
      }
    }
  },
  data() {
    return {
      isActive: false,
      typeList: [
        {
          value: 0,
          label: '前台'
        },
        {
          value: 1,
          label: '后台'
        }
      ],
      digList: [
        {
          value: 0,
          label: '允许'
        },
        {
          value: 1,
          label: '禁止'
        }
      ],
      menuList: [
        {
          id: 0,
          text: '全选',
          checked: true
        },
        {
          id: 13,
          text: '当前代数',
          checked: true,
          prop: 'currentGeneration'
        },
        {
          id: 14,
          text: '辅助代数',
          checked: true,
          prop: 'coachGeneration'
        }
      ],
      creationTime: [],
      creationTime1: [],
      select: {},
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 50
      },
      addOrEdit: '',
      total: 0,
      dialogVisible: false,
      loading: false,
      tableData: {
        censusSummaryList: []
      },
      moren: '/settlementCenter/performanceTotal',
      topList: [
        {
          name: '奖金来源',
          path: '/settlementCenter/performanceTotal'
        }
      ],
      form: {
        name: ''
      },
      rules: {
        name: [
          { required: true, message: '请输入规格类型', trigger: 'blur' }
        ]
      },
      acList: [],
      verList: [],
      memberList: [],
      yieldList: [],
      yieldStatus: [],
      countryList: [],
      orderTypeList: [],
      pkMemberTeam: [],
      pkVertex: [],
      gradeRanglist: [],
      typeId: '',
      dataList: [
        {
          name: 'period',
          key: ''
        },
        {
          name: 'settleDate',
          key: ''
        },
        {
          name: 'orderCode',
          key: ''
        },
        {
          name: 'orderTypeVal',
          key: ''
        },
        {
          name: 'sourceCountryName',
          key: ''
        },
        {
          name: 'sourceMemberCode',
          key: ''
        },
        {
          name: 'sourceMemberName',
          key: ''
        },
        {
          name: 'orderAmount',
          key: ''
        },
        {
          name: 'orderAchieveOri',
          key: ''
        },
        {
          name: 'orderAmountDollar',
          key: ''
        },
        {
          name: 'orderAchieve',
          key: ''
        },
        {
          name: 'settleCountry',
          key: ''
        },
        {
          name: 'memberCode',
          key: ''
        },
        {
          name: 'memberName',
          key: ''
        },
        {
          name: 'pkSettleGradeVal',
          key: ''
        },
        {
          name: 'pkAwardsVal',
          key: ''
        },
        {
          name: 'round',
          key: ''
        },
        {
          name: 'second',
          key: ''
        },
        {
          name: 'currentTouch',
          key: ''
        },
        {
          name: 'expandTouch',
          key: ''
        },
        {
          name: 'currentGeneration',
          key: ''
        },
        {
          name: 'coachGeneration',
          key: ''
        },
        {
          name: 'expandNoCappingOri',
          key: ''
        },
        {
          name: 'expandCappingOri',
          key: ''
        },
        {
          name: 'expandNormalHalfOri',
          key: ''
        },
        {
          name: 'expandNormalRealOri',
          key: ''
        },
        {
          name: 'pretaxIncomeOri',
          key: ''
        },
        {
          name: 'realIncomeOri',
          key: ''
        },
        {
          name: 'expandNoCapping',
          key: ''
        },
        {
          name: 'expandCapping',
          key: ''
        },
        {
          name: 'expandNormalHalf',
          key: ''
        },
        {
          name: 'expandNormalReal',
          key: ''
        },
        {
          name: 'pretaxIncome',
          key: ''
        },
        {
          name: 'realIncome',
          key: ''
        },
        {
          name: 'bonusName',
          key: ''
        },
        {
          name: 'incomeStatusVal',
          key: ''
        },
        {
          name: 'vertexName',
          key: ''
        },
        {
          name: 'teamName',
          key: ''
        },
        {
          name: 'remark',
          key: ''
        },
        {
          name: 'incomeRatio',
          key: ''
        },
        {
          name: 'incomeDialRatio',
          key: ''
        },
        {
          name: 'orderDialRatio',
          key: ''
        }
      ],
      flag: false
    }
  },
  mounted() {
    // 获取下拉
    this.getData()
    this.getPayTime()
    // var day1 = new Date()
    // day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
    // var s1 = this.getStartTime()
    // var s2 = this.getEndTime()
    // this.select.startDate = s1
    // this.select.endDate = s2
    // this.creationTime = [s1, s1]

    setTimeout(() => {
      this.getDataList()
    }, 50)

    this.getUserRole()
  },
  methods: {
    getPayTime() {
      const date = new Date()
      date.setDate(date.getDate() - 1) // 将日期设置为昨天
      const year = date.getFullYear()
      let month = date.getMonth() + 1
      month = month > 9 ? month : '0' + month
      let day = date.getDate()
      day = day > 9 ? day : '0' + day
      this.$set(this, 'creationTime', [
        `${year}-${month}-${day}`,
        `${year}-${month}-${day}`
      ])
      this.select.startDate = `${year}-${month}-${day}`
      this.select.endDate = `${year}-${month}-${day}`
      // this.getSearch()
    },
    getStartTime() {
      const date = new Date()
      date.setDate(1) // 将当前时间的日期设置成第一天
      const year = date.getFullYear() // 得到当前年份
      let month = date.getMonth() + 1 // 得到当前月份（0-11月份，+1是当前月份）
      month = month > 9 ? month : '0' + month // 补零
      let day = date.getDate() // 得到当前天数，实际是本月第一天，因为前面setDate(1) 设置过了
      day = day > 9 ? day : '0' + day // 补零
      return year + '-' + month + '-' + day
    },
    getEndTime() {
      var date = new Date()
      var year = date.getFullYear() // 年
      var month = date.getMonth() + 1 // 月
      var day = date.getDate() > 1 ? date.getDate() - 1 : date.getDate() // 日
      var hour = date.getHours() // 时
      var minutes = date.getMinutes() // 分
      var seconds = date.getSeconds() // 秒
      // 给一位数的数据前面加 “0”
      if (month >= 1 && month <= 9) {
        month = '0' + month
      }
      if (day >= 0 && day <= 9) {
        day = '0' + day
      }
      if (hour >= 0 && hour <= 9) {
        hour = '0' + hour
      }
      if (minutes >= 0 && minutes <= 9) {
        minutes = '0' + minutes
      }
      if (seconds >= 0 && seconds <= 9) {
        seconds = '0' + seconds
      }
      return year + '-' + month + '-' + day + ' '
    },
    isLocalSymbol,
    getUserRole() {
      getRoleMenu('sourceBonus').then((res) => {
        this.dataList.forEach((item) => {
          res.data.forEach((items) => {
            if (item.name == items) {
              item.key = items
            }
          })
        })
        this.flag = true
      })
    },
    stateFormat,
    // 展开折叠
    changeActive() {
      this.isActive = !this.isActive
    },
    reset() {
      this.select = {}
      this.pkVertex = []
      this.pkMemberTeam = []
      this.typeId = ''
      this.creationTime = ''
    },
    getMenu(e, id) {
      if (e && id == 0) {
        this.menuList.forEach((item) => {
          this.$set(item, 'checked', true)
        })
      } else if (!e && id == 0) {
        this.menuList.forEach((item) => {
          this.$set(item, 'checked', false)
        })
      }
    },
    getData() {
      // 获取隶属体系
      api.vertexList().then((res) => {
        this.verList = res.data
      })
      // 获取隶属团队
      api.memberTeam().then((res) => {
        this.memberList = res.rows
      })
      // 获取收益类型
      log.getYieldType().then((res) => {
        this.yieldList = res.rows
      })
      // 获取收益状态
      log.getYieldStatus().then((res) => {
        this.yieldStatus = res.data
      })
      // 获取订单类型
      log.getOrderType().then((res) => {
        this.orderTypeList = res.data
      })
      api.gradeRanglist().then((res) => {
        this.gradeRanglist = res.data
      })
      // 获取国家
      getcountryAllList().then((res) => {
        this.countryList = res.data
      })
    },
    changeTime(val) {
      if (val) {
        this.select.startDate = val[0]
        this.select.endDate = val[1]
      }
    },
    // 点击修改
    toFixed(id) {
      this.addOrEdit = false
      this.dialogVisible = true
      this.$router.push({
        path: 'noticeList/details',
        query: {
          pkId: id
        }
      })
    },
    getSummaries(param) {
      this.$nextTick(() => {
        this.$refs.table.doLayout()
      })
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '小计' + '(￥)'
          return
        }

        if (
          column.property == 'realIncome' ||
          column.property == 'pretaxIncome' ||
          column.property == 'realIncomeOri' ||
          column.property == 'pretaxIncomeOri'
        ) {
          const values = data.map((item) => Number(item[column.property]))
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr)
              if (!isNaN(value)) {
                return prev + curr
              } else {
                return prev
              }
            }, 0)
            // sums[index] += ' 元'
            if (typeof sums[index] === 'number') {
              sums[index] = sums[index].toFixed(2)
            }
          } else {
            sums[index] = ''
          }
        }
      })
      return sums
    },
    // 删除
    handleDelete(id) {
      this.$confirm('确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        api.classifyDel(id).then((res) => {
          this.getDataList()
        })
      })
    },
    onSubmit(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          let url = ''
          if (this.addOrEdit == true) {
            url = classifySave
          } else {
            url = classifyUpdate
          }
          url(this.form).then((res) => {
            if (res.code == 200) {
              this.$message({
                message: res.msg,
                type: 'success'
              })
              this.dialogVisible = false
              // 充值数据
              this.$refs[formName].resetFields()
              // 获取列表
              this.getDataList()
            }
          })
        } else {
          return false
        }
      })
    },
    handleClose() {
      this.dialogVisible = false
      this.$refs['form'].clearValidate()
      this.$refs['form'].resetFields()
    },
    openDig() {
      this.$router.push({
        path: 'noticeList/details'
      })
    },
    getDataList() {
      this.loading = true
      this.typeId = this.select.pkBonusItems
      if (this.creationTime == '' || this.creationTime == null) {
        this.select.startDate = ''
        this.select.endDate = ''
      }
      bonusSource(
        Object.assign({}, this.select),
        `?pageNum=${this.queryParams.pageNum}&pageSize=${this.queryParams.pageSize}`
      ).then((res) => {
        this.loading = false
        this.tableData.censusSummaryList = res.rows
        this.total = res.total
      })
    },
    handleSelectionChange(val) {},
    /** 导出按钮操作 */
    handleExport() {
      this.$confirm('是否确认导出所有数据项?', '警告', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then((_) => {
        this.download(
          '/bonus/manage/bonus/export-bonus-source',
          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--scrollable-y .el-table__body-wrapper {
  //height: 100%!important;
}
::v-deep .el-range-editor.el-input__inner {
  width: 100%;
}
::v-deep .el-date-editor .el-range__close-icon {
  margin-top: -10px;
}
::v-deep .el-date-editor .el-range-separator {
  margin-top: -10px;
}
::v-deep .el-date-editor .el-range__icon {
  margin-top: -10px;
}
::v-deep .el-input__inner {
  //height:28px;
  //line-height: 28px;
}
::v-deep .el-form-item__label {
  color: #333;
  font-weight: inherit;
}
::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%;
}
.uploadIcon ::v-deep .el-upload--picture-card {
  display: none !important; /* 上传按钮隐藏 */
}
.page {
  padding: 20px;
  background: #f9f9f9;
  font-size: 14px;
  .main {
    background: #f9f9f9;
    //border-radius: 8px;
    //box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
    .maintop {
      display: flex;
      //padding: 10px 0;
      justify-content: space-between;
      align-items: center;
      .mainbtn {
        .thebtn1 {
          background: #3181e5;
          color: #ffffff;
        }
        .thebtn2 {
          background: #ffad41;
          color: #ffffff;
        }
      }
      .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;
  }
}
.openClose {
  margin-right: 10px;
  color: #666666;
  text-align: center;
}
.kuang {
  padding: 5px 20px;
  background: rgba(255, 255, 255, 0);
  border-radius: 4px;
  border: 1px solid #cccccc;
}
.heji {
  margin-top: 10px;
  .dis {
    display: flex;
    justify-content: right;
    padding: 5px 10px;
    font-size: 14px;
    color: #333333;
    :nth-child(1) {
      font-size: 14px;
      font-weight: bold;
      color: #333333;
      margin-right: 20px;
    }
  }
}
</style>
<style>
.itemTrading .el-table {
  overflow: auto;
}
.itemTrading .el-table__body-wrapper,
.itemTrading .el-table__header-wrapper,
.itemTrading .el-table__footer-wrapper {
  overflow: visible;
}
.itemTrading .el-table::after {
  position: relative !important;
}

.body-theme-grenn .el-table--scrollable-x .el-table__body-wrapper {
  overflow: visible;
}
</style>
