<!--
 * @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>
          <td align="right">{{ '签呈编号' }}</td>
          <td align="left">{{ item.approvalCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '订单编号' }}</td>
          <td align="left">{{ item.orderCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '订单类型' }}</td>
          <td align="left">{{ item.orderTypeStr }}</td>
        </tr>
        <tr>
          <td align="right">{{ '撤单类型' }}</td>
          <td align="left">{{ item.chargeTypeStr }}</td>
        </tr>
        <tr>
          <td align="right">{{ '注册类型' }}</td>
          <td align="left">{{ item.customerTypeStr }}</td>
        </tr>
        <tr>
          <td align="right">{{ '关联编号' }}</td>
          <td align="left">{{ item.relevancyMemberCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '关联部门' }}</td>
          <td align="left">{{ item.relevancyDeptStr }}</td>
        </tr>
        <tr>
          <td align="right">{{ '会员编号' }}</td>
          <td align="left">{{ item.memberCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '会员姓名' }}</td>
          <td align="left">{{ item.memberName }}</td>
        </tr>
        <tr>
          <td align="right">{{ '联系方式' }}</td>
          <td align="left">{{ item.phone }}</td>
        </tr>
        <tr>
          <td align="right">{{ '推荐编号' }}</td>
          <td align="left">{{ item.parentCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '推荐姓名' }}</td>
          <td align="left">{{ item.parentName }}</td>
        </tr>
        <tr>
          <td align="right">{{ '安置编号' }}</td>
          <td align="left">{{ item.placeParentCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '安置姓名' }}</td>
          <td align="left">{{ item.placeParentName }}</td>
        </tr>
        <tr>
          <td align="right">{{ '安置部门' }}</td>
          <td align="left">{{ item.placeDeptStr }}</td>
        </tr>
        <tr>
          <td align="right">{{ '服务中心编号' }}</td>
          <td align="left">{{ item.pkCenterCode }}</td>
        </tr>
        <tr>
          <td align="right">{{ '服务中心姓名' }}</td>
          <td align="left">{{ item.pkCenterName }}</td>
        </tr>
        <tr>
          <td align="right">{{ '消费金额' }}({{ isLocalSymbol() }})</td>
          <td align="left">{{ item.orderAmount }}</td>
        </tr>
        <tr>
          <td align="right">{{ '消费业绩' }}({{ isLocalSymbol() }})</td>
          <td align="left">{{ item.orderAchieve }}</td>
        </tr>
        
        <tr v-if="getColumnVisibleByColumnName('vertexName')">
          <td align="right">{{ '隶属体系' }}</td>
          <td align="left">{{ item.vertexName }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('pkTeamName')">
          <td align="right">{{ '隶属团队' }}</td>
          <td align="left">{{ item.pkTeamName }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recName')">
          <td align="right">{{ '收货人' }}</td>
          <td align="left">{{ item.recName }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recPhone')">
          <td align="right">{{ '收货电话' }}</td>
          <td align="left">{{ item.recPhone }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recProvinceStr')">
          <td align="right">{{ '省' }}</td>
          <td align="left">{{ item.recProvinceStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recCityStr')">
          <td align="right">{{ '市' }}</td>
          <td align="left">{{ item.recCityStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recCountyStr')">
          <td align="right">{{ '区/县' }}</td>
          <td align="left">{{ item.recCountyStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('recAddress')">
          <td align="right">{{ '详细地址' }}</td>
          <td align="left">{{ item.recAddress }}</td>
        </tr>
        <tr>
          <td align="right">{{ '产品名称' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList">
              {{ ctem.productName }}
            </div>
          </td>
        </tr>
        <tr>
          <td align="right">{{ '产品规格' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList">
              {{ ctem.specsName }}
            </div>
          </td>
        </tr>
        <tr>
          <td align="right">{{ '产品数量' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList">
              {{ ctem.quantity }}
            </div>
          </td>
        </tr>
        <tr>
          <td align="right">{{ '产品总额' }}(¥)</td>
          <td align="left">{{ item.prices }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('postage')">
          <td align="right">{{ '订单邮费' }}(¥)</td>
          <td align="left">{{ item.postage }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('orderAmount')">
          <td align="right">{{ '订单总额' }}(¥)</td>
          <td align="left">{{ item.orderAmount }}</td>
        </tr>
        
        <tr>
          <td align="right">{{ '订单状态' }}</td>
          <td align="left">{{ item.orderStatusStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('logisticsCompany')">
          <td align="right">{{ '物流公司' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList" :key="ctem.logisticsCompany">
              {{ ctem.logisticsCompany }}
            </div>
          </td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('logisticsCode')">
          <td align="right">{{ '物流单号' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList" :key="ctem.logisticsCode">
              {{ ctem.logisticsCode }}
            </div>
          </td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('creationTime')">
          <td align="right">{{ '创建日期' }}</td>
          <td align="left">{{ item.creationTime }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('payTime')">
          <td align="right">{{ '支付日期' }}</td>
          <td align="left">{{ item.payTime }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('deliveryTime')">
          <td align="right">{{ '发货日期' }}</td>
          <td align="left">
            <div v-for="ctem in item.itemList">
              {{ ctem.deliveryTime }}
            </div>
          </td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('deliveryWayStr')">
          <td align="right">{{ '发货方式' }}</td>
          <td align="left">{{ item.deliveryWayStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('operateScopeStr')">
          <td align="right">{{ '销售方式' }}</td>
          <td align="left">{{ item.operateScopeStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('tranTypeStr')">
          <td align="right">{{ '运输方式' }}</td>
          <td align="left">{{ item.tranTypeStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('preSaleStatusStr')">
          <td align="right">{{ '预售状态' }}</td>
          <td align="left">{{ item.preSaleStatusStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('payTypeStr')">
          <td align="right">{{ '支付方式' }}</td>
          <td align="left">{{ item.payTypeStr }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('cancelOrderTime')">
          <td align="right">{{ '撤单日期' }}</td>
          <td align="left">{{ item.cancelOrderTime }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('creatorName')">
          <td align="right">{{ '撤单人' }}</td>
          <td align="left">{{ item.creatorName }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('approvalStatus')">
          <td align="right">{{ '审核状态' }}</td>
          <td align="left">{{ item.approvalStatus }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('lastInstanceDate')">
          <td align="right">{{ '终审日期' }}</td>
          <td align="left">{{ item.lastInstanceDate }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('lastInstanceApprover')">
          <td align="right">{{ '终审人' }}</td>
          <td align="left">{{ item.lastInstanceApprover }}</td>
        </tr>
        <tr v-if="getColumnVisibleByColumnName('lastInstanceRemark')">
          <td align="right">{{ '终审意见' }}</td>
          <td align="left">{{ item.lastInstanceRemark }}</td>
        </tr>
        <tr>
          <td align="right">{{ '终审状态' }}</td>
          <td align="left">{{ item.lastInstanceStatus }}</td>
        </tr>
        <tr>
          <td align="right">{{ '来源' }}</td>
          <td align="left">{{ item.orderChargeLogSourceStr }}</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>
    <!-- 顶部搜索 -->
    <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.relevancyMemberCode"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'关联部门'">
                <picker :range="deptList"
                        range-key="label"
                        @change="bindPickerChange1">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.relevancyDeptVal"
                            suffixIcon="arrow-down"
                            suffixIconStyle="font-size: 12px;"></u--input>
                </picker>
              </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.phone"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'撤单人'">
                <u--input fontSize="12"
                          v-model="select.creatorName"></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.approvalCode"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'订单编号'">
                <u--input fontSize="12"
                          v-model="select.orderCode"></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.pkCenterCode"></u--input>
              </u-form-item>
            </u-col>
            <u-col span="6">
              <u-form-item :label="'服务中心姓名'">
                <u--input fontSize="12"
                          v-model="select.pkCenterName"></u--input>
              </u-form-item>
            </u-col>
          </u-row>
          <u-row gutter="10">
            <u-col span="6">
              <u-form-item :label="'订单类型'">
                <picker :range="orderTypeList"
                        range-key="label"
                        @change="bindPickerChange2">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.orderTypeVal"
                            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="cancleList"
                        range-key="label"
                        @change="bindPickerChange3">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.chargeTypeVal"
                            suffixIcon="arrow-down"
                            suffixIconStyle="font-size: 12px;"></u--input>
                </picker>
              </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-row gutter="10">
            <u-col span="6">
              <u-form-item :label="'注册类型'">
                <picker :range="kdzcList"
                        range-key="label"
                        @change="bindPickerChange6">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.customerTypeVal"
                            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="sourceList"
                        range-key="label"
                        @change="bindPickerChange7">
                  <u--input disabled
                            fontSize="12"
                            disabledColor="#ffffff"
                            v-model="select.orderChargeLogSourceVal"
                            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,setTime=0">
                <u--input disabled
                          fontSize="12"
                          disabledColor="#ffffff"
                          v-model="select.creationTimeVal0"
                          suffixIcon="arrow-down"
                          suffixIconStyle="font-size: 12px;"></u--input>
              </u-form-item>
            </u-col>
          </u-row>
          <u-row gutter="10">
            <u-col span="12">
              <u-form-item :label="'支付日期'"
                           @click="isData=true,setTime=1">
                <u--input disabled
                          fontSize="12"
                          disabledColor="#ffffff"
                          v-model="select.creationTimeVal1"
                          suffixIcon="arrow-down"
                          suffixIconStyle="font-size: 12px;"></u--input>
              </u-form-item>
            </u-col>
          </u-row>
          <u-row gutter="10">
            <u-col span="12">
              <u-form-item :label="'撤单日期'"
                           @click="isData=true,setTime=2">
                <u--input disabled
                          fontSize="12"
                          disabledColor="#ffffff"
                          v-model="select.creationTimeVal2"
                          suffixIcon="arrow-down"
                          suffixIconStyle="font-size: 12px;"></u--input>
              </u-form-item>
            </u-col>
          </u-row>
          <u-row gutter="10">
            <u-col span="12">
              <u-form-item :label="'终审日期'"
                           @click="isData=true,setTime=3">
                <u--input disabled
                          fontSize="12"
                          disabledColor="#ffffff"
                          v-model="select.creationTimeVal3"
                          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>
    <u-datetime-picker :show="isDataTime"
                       @confirm="getBirth"
                       @cancel="isDataTime = false"
                       :minDate="minDate"
                       :maxDate="todayData"
                       v-model="birthDate"
                       mode="date"></u-datetime-picker>
    <!-- 悬浮球 -->
    <drag-button />
    <export-ball ref="exportBall"
    v-hasButtons="['removeOrderExport']"
                 @handleExport="handleExport" />
    <!-- 选择地址 -->
    <v-address ref="address"
               :defaultCode="defaultCode"
               @addressData="addressData"></v-address>
  </view>
</template>

<script>
import address from '@/components/address.vue'
import * as api from '@/api/information'
import { isLocals, isLocalSymbol } from '@/util/numberToCurrency'
export default {
  components: {
    'v-address': address,
  },
  data() {
    return {
      defaultCode: [],
      select: {},
      isTop: false,
      isData: false,
      isDataTime: 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: 3,
          text: '隶属体系',
          checked: true,
          prop: 'vertexName',
        },
        {
          id: 4,
          text: '隶属团队',
          checked: true,
          prop: 'pkTeamName',
        },
        {
          id: 5,
          text: '收货人',
          checked: true,
          prop: 'recName',
        },
        {
          id: 6,
          text: '收货电话',
          checked: true,
          prop: 'recPhone',
        },
        {
          id: 7,
          text: '省',
          checked: true,
          prop: 'recProvinceStr',
        },
        {
          id: 8,
          text: '市',
          checked: true,
          prop: 'recCityStr',
        },
        {
          id: 9,
          text: '区/县',
          checked: true,
          prop: 'recCountyStr',
        },
        {
          id: 10,
          text: '详细地址',
          checked: true,
          prop: 'recAddress',
        },
        
        {
          id: 14,
          text: '物流公司',
          checked: true,
          prop: '',
        },
        {
          id: 15,
          text: '物流单号',
          checked: true,
          prop: '',
        },
        {
          id: 16,
          text: '创建日期',
          checked: true,
          prop: 'creationTime',
        },
        {
          id: 17,
          text: '支付日期',
          checked: true,
          prop: 'payTime',
        },
        {
          id: 18,
          text: '发货日期',
          checked: true,
          prop: 'deliveryTime',
        },
        {
          id: 19,
          text: '发货方式',
          checked: true,
          prop: 'deliveryWayStr',
        },
        {
          id: 20,
          text: '销售方式',
          checked: true,
          prop: 'operateScopeStr',
        },
        {
          id: 21,
          text: '运输方式',
          checked: true,
          prop: 'tranTypeStr',
        },
        {
          id: 22,
          text: '审核状态',
          checked: true,
          prop: 'approvalStatus',
        },
        {
          id: 23,
          text: '支付方式',
          checked: true,
          prop: 'payTypeStr',
        },
        {
          id: 24,
          text: '撤单日期',
          checked: true,
          prop: 'cancelOrderTime',
        },
        {
          id: 25,
          text: '撤单人',
          checked: true,
          prop: 'creatorName',
        },
        {
          id: 26,
          text: '终审日期',
          checked: true,
          prop: 'lastInstanceDate',
        },
        {
          id: 27,
          text: '终审人',
          checked: true,
          prop: 'lastInstanceApprover',
        },
        {
          id: 28,
          text: '终审意见',
          checked: true,
          prop: 'lastInstanceRemark',
        },
        {
          id: 29,
          text: '预售状态',
          checked: true,
          prop: 'preSaleStatusStr'
        }
      ],
      allTxt: {},
      vertexList: [],
      memberteamList: [],
      deptList: [],
      kdzcList: [],
      sourceList: [],
      orderTypeList: [],
      cancleList: [],
      calendar: {
        minDate: '',
        maxDate: '',
        monthNum: 25,
      },
      minDate: '',
      todayData: '',
      birthDate: '',
      sexList: [],
    }
  },
  onLoad(options) {
    //查询会员信息
    this.getMemberList()
    // 获取字段权限
    // this.getUserRole()
    // 获取下拉
    this.getData()
    this.chooseTimed()
    this.getAll([0])
    this.todayData = Date.now()
    this.minDate = Number(new Date('1950-01-01'))
  },
  onReachBottom() {
    this.queryParams.pageNum++
    this.getMemberList()
  },
  methods: {
    getColumnVisibleByColumnName(columnName) {
      return !!this.menuList.find(item => item.prop === columnName)?.checked
    },
    isLocalSymbol,
    isLocals,
    // 设置默认日期，最大值为今天，最小值为去年今天
    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.getvertexValue().then((res) => {
        this.vertexList = res.data
      })
      //隶属团队下拉选
      api.getmemberTeamList().then((res) => {
        this.memberteamList = res.rows
      })
      // 关联部门
      api.getPlacedeptList().then((res) => {
        this.deptList = res.data
      })
      // 订单类型
      api.getOrderType().then((res) => {
        this.orderTypeList = res.data
      })
      // 撤单类型
      api.getCancleList().then((res) => {
        this.cancleList = res.data
      })
      // 注册类型
      api.getorderStatus().then((res) => {
        this.kdzcList = res.data
      })
      api.noticeWebsite().then((res) => {
        this.sourceList = res.data
      })
    },
    getDiqu() {
      this.$refs.address.setShow()
    },
    getBirth(e) {
      this.select.birthDate = this.$moment(e.value).format('YYYY-MM-DD')
      this.isDataTime = false
    },
    // 全选
    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() {
      api.getRoleMenu('RealInfo').then((res) => {
        let obj = {}
        res.data.forEach((item) => {
          obj[item] = 1
        })
        this.allTxt = obj
      })
    },
   
    //查询会员信息
    getMemberList() {
      api
        .orderChargeLog(Object.assign({}, this.queryParams, this.select))
        .then((res) => {
          res.rows.forEach((item) => {
            if (item.approvalStatus == 1) {
              item.approvalStatus = '审核中'
            } else if (item.approvalStatus == 2) {
              item.approvalStatus = '审核通过'
            } else if (item.approvalStatus == 3) {
              item.approvalStatus = '审核驳回'
            }
          })
          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() {
      let url = '/sale/manage/order-charge-log/export'
      let obj = Object.assign({}, this.select, this.queryParams)
      this.$refs.exportBall.handleExport(
        url,
        obj,
        `${'撤单列表'}${new Date().getTime()}`
      )
    },
    bindPickerChange1(e) {
      this.$set(
        this.select,
        'relevancyDeptVal',
        this.deptList[e.detail.value].label
      )
      this.$set(
        this.select,
        'relevancyDept',
        this.deptList[e.detail.value].value
      )
    },
    bindPickerChange2(e) {
      this.$set(
        this.select,
        'orderTypeVal',
        this.orderTypeList[e.detail.value].label
      )
      this.$set(
        this.select,
        'orderType',
        this.orderTypeList[e.detail.value].value
      )
    },
    bindPickerChange3(e) {
      this.$set(
        this.select,
        'chargeTypeVal',
        this.cancleList[e.detail.value].label
      )
      this.$set(
        this.select,
        'chargeType',
        this.cancleList[e.detail.value].value
      )
    },
    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,
        'customerTypeVal',
        this.kdzcList[e.detail.value].label
      )
      this.$set(this.select, 'customerType', this.kdzcList[e.detail.value].value)
    },
    bindPickerChange7(e) {
      this.$set(
        this.select,
        'orderChargeLogSourceVal',
        this.sourceList[e.detail.value].label
      )
      this.$set(this.select, 'orderChargeLogSource', this.sourceList[e.detail.value].value)
    },
    confirm(e) {
      if (this.setTime == 0) {
        this.$set(this.select, 'startCreationTime', e[0])
        this.$set(this.select, 'endCreationTime', e[e.length - 1])
        this.$set(
          this.select,
          'creationTimeVal0',
          e[0] + ' 至 ' + e[e.length - 1]
        )
      } else if (this.setTime == 1) {
        this.$set(this.select, 'startPayTime', e[0])
        this.$set(this.select, 'endPayTime', e[e.length - 1])
        this.$set(
          this.select,
          'creationTimeVal1',
          e[0] + ' 至 ' + e[e.length - 1]
        )
      } else if (this.setTime == 2) {
        this.$set(this.select, 'startCreationTime', e[0])
        this.$set(this.select, 'endCreationTime', e[e.length - 1])
        this.$set(
          this.select,
          'creationTimeVal2',
          e[0] + ' 至 ' + e[e.length - 1]
        )
      } else {
        this.$set(this.select, 'startLastInstanceDate', e[0])
        this.$set(this.select, 'endLastInstanceDate', e[e.length - 1])
        this.$set(
          this.select,
          'creationTimeVal3',
          e[0] + ' 至 ' + e[e.length - 1]
        )
      }
      this.isData = false
    },
    addressData(diqu, obj) {
      this.select.diqu = diqu
      this.select.recProvince = obj.province
      this.select.recCity = obj.city
      this.select.recCounty = obj.county
      this.$forceUpdate()
    },
  },
}
</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;
}
.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;
}
</style>