<template>
<!-- 确权资料管理 -->
  <div>
    <up-down-layout :header="$t('confirmationRightData.title1')" :handleFlag.sync="handleFlag">
      <search-form :formValue.sync="queryParas"
                   searchPerms="search"
                   @handleFilter="coustomHandleFilter"
                   @clearParam="clearParam"
                   slot="query"
                   resetPerms="reset"
                   @selectChanged="searchSelectChanged"
                   class="component-width"
                   :componentList="componentList"></search-form>
      <template slot="table">
        <data-table :api="api" :deleteApi="api"
          :headTitle = "$t('confirmationRightData.tableHead')"
          :showSelection="true"
          selectable="false"
          :handleFlag.sync="handleFlag"
          :sourceData.sync="sourceData"
          :menuFlag="true"
          v-bind="elHeightObj"
          :queryParas="queryParas"
          :loadCount.sync="loadCount"
          :columns="columns"
          operateBtnLayout=""
          :operatWidth="'200'"
          @getTableData="getTableData"
          @selectRowChange="selectRowChange">
          <template slot="headButton">
            <div class="confirmRightData-headBox">
              <div align="left">
                <el-checkbox :disabled="sourceData.length === 0" v-model="forceAllFiles">{{$t('confirmationRightData.forceAllFiles')}}</el-checkbox>
              </div>
              <div align="right">
                <!--总部资料下载-->
                <auth-button size="medium" type="primary" icon="iconfont iconxiazai1" :loading="headquartersDataDownLoading"
                             :menuCode="menuId" perms="btnZbZlDown" :openPerms="true"
                             :label="$t('confirmationRightData.headquartersDataDown')" @click="downLoad(['6'])"></auth-button>
                <!--生成文件-->
                <auth-button size="medium" type="primary" icon="iconfont iconshengcheng1" :label="$t('confirmationRightData.generateMaterial')"
                             :menuCode="menuId" perms="btnSCFile" :openPerms="true"
                             @click="generateData" :loading="generateMaterialLoading"></auth-button>
                  <!--下载文件-->
                <auth-button size="medium" type="primary" icon="iconfont iconxiazai1" :loading="materialDownloadLoading"
                             :menuCode="menuId" perms="btnDownFile" :openPerms="true"
                             :label="$t('confirmationRightData.materialDownload')" @click="downLoad(['2', '6'])"></auth-button>
                <!--                          <btn-download :classType="classType" :dataList="dataList"-->
                <!--                                        :fileType="fileType1" :downloadButtonMsg="$t('confirmationRightData.materialDownload')"></btn-download>-->
                <!--<auth-button size="medium" type="primary" icon="iconfont iconxiazai1" :label="$t('confirmationRightData.materialDownload')" @click="downLoad"></auth-button>-->
                <!--导出-->
                <btn-export :btnSize="'medium'" :openPerms="true" :menuCode="menuId"
                            perms="btnExport" :queryParas="exportQueryParas" :templateCode="templateCode"></btn-export>
              </div>
            </div>
          </template>
          <!-- 已有文件 -->
          <template slot="files" slot-scope="scope">
            <expand-collapse :sourceData="sourceData" :colProp="'filesLocal'"
                             :valueProp="'file'" :rowIndex="scope.data.$index"></expand-collapse>
<!--            <div>-->
<!--              <div v-for="(item, index) in scope.data.row.files" :key="index">-->
<!--                {{item ? `《${item}》` : ''}}-->
<!--              </div>-->
<!--              <a class="assetMaterialDetailDtoList-morebtn" v-if="!scope.data.row.isOpen && scope.data.row.files && scope.data.row.files.length > 2" @click="changeOpenes(scope.data.$index)">更多》</a>-->
<!--            </div>-->
          </template>
          <template slot="businessProcessStatus" slot-scope="scope">
            <expand-collapse :sourceData="sourceData" :colProp="'businessProcessStatusLocal'"
                             :valueProp="'businessProcessStatus'" :rowIndex="scope.data.$index"></expand-collapse>
          </template>
          <!-- 确权文件生成状态 -->
          <template slot="generateState" slot-scope="scope">
            {{scope.data.row.generateState}}
            <!--                      {{getConfirmDocGenState(scope.data.row.approvalStatus, scope.data.row.approvalException)}}-->
          </template>
          <!-- 文件情况 -->
          <el-table-column align="center" fixed="right" :label="$t('confirmationRightData.documentation')" width="80px">
            <template slot-scope="scope">
              <!-- <el-tooltip :content="$t('common.view')" placement="bottom" effect="light">
                <el-button icon="iconfont iconchakan"></el-button>
                <i class="iconfont iconchakan"></i>
              </el-tooltip> -->
              <auth-button size="small" class="iconCircle" icon="iconfont iconview"
                           :menuCode="menuId" perms="btnShow" :openPerms="true"
                           :title="$t('common.view')" @click="handleClick(scope.row, 'V')"></auth-button>
            </template>
          </el-table-column>
          <!-- 操作 -->
          <el-table-column align="center" fixed="right"  :label="$t('common.operate')" width="80px">
            <template slot-scope="scope">
              <auth-button size="small" class="iconCircle" icon="iconfont iconmore"
                           :menuCode="menuId" perms="btnDetails" :openPerms="true"
                           :title="$t('confirmationRightData.details')" @click="handleClick(scope.row, 'L')"></auth-button>
            </template>
          </el-table-column>
        </data-table>
      </template>
    </up-down-layout>
    <confirmation-right-data-manage-edit editModel="V" :form="item" :visible.sync="visible" :menuId="menuId"></confirmation-right-data-manage-edit>
    <factoring-info-detail :visible.sync="supplierVisible" :keyId="supplierItem" :contractShow="true"></factoring-info-detail>
    <generate-result :visible.sync="resultVisible" :form="formItem" editModel="V"></generate-result>
  </div>
</template>
<script>
import { searchForm, upDownLayout, DataTable, btnExport, authButton, SelectProductName, SelectCoreEnterprise, ExpandCollapse,
  SelectFinancialInstitutions, SelectProjectCompanyName, SelectAreaCommissioner, factoringInfoDetail } from 'newepoch-components'
import BasePage from '@/pages/shourang/confirmationRightData/confirmationRightDataBasePage'
import SelectArea from '@/components/element/enterpriseInfoManage/SelectArea'
import confirmationRightDataManageEdit from '@/pages/shourang/confirmationRightData/confirmationRightDataManageEdit.vue'
import * as format from '@/filters/index'
import fileApi from '@/api/fileApi'
import { downFile } from '@/utils/devUtils'
import confirmationRightDataApi from '@/api/confirmationRightDataApi.js'
import btnDownload from '@/components/element/shourang/btnDataDownload'
import SelectBusinessProcessStatus from '@/components/element/shourang/SelectBusinessProcessStatus'
import factorDataManageApi from '@/api/factorDataManageApi'
import mixin from '@/pages/mixin'
import generateResult from '@/pages/shourang/common/generateResult'
import componentsApi from '@/api/componentsApi'
import { regExp } from '@/validator/index'

export default {
  extends: new BasePage('confirmationRightData'),
  mixins: [mixin],
  name: 'confirmationRightDataManage',
  components: {
    searchForm,
    upDownLayout,
    DataTable,
    btnExport,
    factoringInfoDetail,
    authButton,
    confirmationRightDataManageEdit,
    // SupplierFactorInfoEdit,
    SelectProductName,
    SelectProjectCompanyName,
    SelectAreaCommissioner,
    btnDownload,
    ExpandCollapse,
    generateResult
  },
  data () {
    const labelWidth = '170px ' // 为防止电脑设置自定义字体，宽度应设置长一点
    return {
      exQueryParas: {},
      resultVisible: false,
      formItem: {},
      reMsg: this.$i18n.messages[this.$i18n.locale].factorDataManageList,
      // 下载数据
      dataList: [],
      headquartersDataDownLoading: false,
      // 总部资料加载
      materialDownloadLoading: false,
      // 生成文件
      generateMaterialLoading: false,
      classType: true,
      // 文件类型 总部资料下载
      fileType: [6],
      // 确权文件下载
      fileType1: [6, 2],
      formatDict: format.formatDict,
      supplierItem: '',
      supplierVisible: false,
      templateCode: 'assetassignee07',
      handleFlag: true,
      visible: false,
      // 强制生成
      forceAllFiles: false,
      loadCount: 0,
      queryParas: {
        fileBussType: '1',
        projectCompanyId: ''
      },
      item: {},
      queryData: {},
      componentList: [
        {
          // 产品名称
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.productName,
          value: 'projectId',
          name: 'projectId',
          labelWidth: labelWidth,
          componentName: SelectProductName
        },
        {
          // 期数
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.specialPlanPeriods,
          value: 'specialPlanPeriods',
          disabled: false,
          maxlength: '3',
          placeholder: this.$i18n.messages[this.$i18n.locale].common.pleaseInput,
          labelWidth: labelWidth,
          componentName: 'el-input'
        },
        {
          // 账款到期日
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.dueDate,
          disabled: false,
          value: 'dueDate',
          placeholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          labelWidth: labelWidth,
          clearable: true,
          format: 'timestamp',
          componentName: 'el-date-picker'
        },
        {
          // 付款确认书编号
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.payCode,
          disabled: false,
          value: 'assetCode',
          placeholder: this.$i18n.messages[this.$i18n.locale].common.pleaseInput,
          labelWidth: labelWidth,
          clearable: true,
          componentName: 'el-input'
        },
        {
          // 核心企业
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.coreEnterpriseName,
          disabled: false,
          value: 'coreEnterpriseId',
          labelWidth: labelWidth,
          clearable: true,
          componentName: SelectCoreEnterprise
        },
        {
          // 计划管理人/再保理银行
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.planningManagerName,
          disabled: false,
          value: 'planningManagerId',
          labelWidth: labelWidth,
          clearable: true,
          componentName: SelectFinancialInstitutions
        },
        {
          // 项目公司名称
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.projectCompanyName,
          disabled: false,
          value: 'debtorId',
          labelWidth: labelWidth,
          clearable: true,
          componentName: SelectProjectCompanyName
        },
        {
          // 总部盖章方式
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.headquartersStampType,
          disabled: false,
          value: 'coreEnterpriseStampWay',
          labelWidth: labelWidth,
          clearable: true,
          componentName: 'SelectDictionary',
          dictTypeCode: 'ZD0081'
        },
        {
          // 项目公司盖章方式
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.projectStampType,
          disabled: false,
          value: 'debtorStampWay',
          labelWidth: labelWidth,
          clearable: true,
          componentName: 'SelectDictionary',
          dictTypeCode: 'ZD0081'
        },
        {
          // 供应商盖章方式
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.suppliersStampType,
          disabled: false,
          value: 'creditorStampWay',
          labelWidth: labelWidth,
          clearable: true,
          componentName: 'SelectDictionary',
          dictTypeCode: 'ZD0081'
        },
        {
          // 是否通过
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.isPass,
          disabled: false,
          value: 'onlineAuditStatus',
          labelWidth: labelWidth,
          clearable: true,
          componentName: 'SelectDictionary',
          dictTypeCode: 'ZD0003'
        },
        {
          // 区域
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.region,
          value: 'coreAreaId',
          labelWidth: labelWidth,
          filterable: true,
          componentName: SelectArea,
          multiple: true,
          placeholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect
        },
        {
          // 区域专员
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.regionAttache,
          value: 'coreAreaAttache',
          labelWidth: labelWidth,
          componentName: SelectAreaCommissioner,
          placeholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          multiple: true
        },
        {
          // 业务流程状态
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.businessProcessStatus,
          disabled: false,
          value: 'businessProcessStatus',
          labelWidth: labelWidth,
          clearable: true,
          componentName: SelectBusinessProcessStatus,
          dictTypeCode: 'ZD0085',
          multiple: true
        },
        {
          // 申请时间 startApplicationDate endApplicationDate
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.applicationDate,
          disabled: false,
          value: 'applicationDate',
          startPlaceholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          endPlaceholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          labelWidth: labelWidth,
          type: 'daterange',
          defaultTime: ['00:00:00', '23:59:59'],
          clearable: true,
          format: 'timestamp',
          componentName: 'el-date-picker'
        },
        {
          // 导入时间 startAddTime endAddTime
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.addTime,
          disabled: false,
          value: 'addTime',
          startPlaceholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          endPlaceholder: this.$i18n.messages[this.$i18n.locale].common.pleaseSelect,
          labelWidth: labelWidth,
          type: 'daterange',
          defaultTime: ['00:00:00', '23:59:59'],
          clearable: true,
          format: 'timestamp',
          componentName: 'el-date-picker'
        }
      ],
      columns: [
        {
          // 付款确认书编号
          prop: 'assetCode',
          align: 'left',
          width: '200px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.payCode
        },
        {
          // 核心企业
          prop: 'coreEnterpriseName',
          align: 'left',
          width: '200px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.coreEnterpriseName
        },
        {
          // 供应商名称
          prop: 'creditor',
          align: 'left',
          width: '200px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.suppliersName
        },
        {
          // 项目公司名称
          prop: 'debtor',
          align: 'left',
          width: '200px',
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.projectCompanyName
        },
        {
          // 总部盖章方式
          prop: 'coreEnterpriseStampWay',
          align: 'center',
          width: '130px',
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.headquartersStampType,
          format: (row) => { return format.formatDict(row.coreEnterpriseStampWay, 'ZD0081') }
        },
        {
          // 项目公司盖章方式
          prop: 'debtorStampWay',
          align: 'center',
          width: '140px',
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.projectStampType,
          format: (row) => { return format.formatDict(row.debtorStampWay, 'ZD0081') }
        },
        {
          // 计划管理人/再保理银行
          prop: 'planningManagerName',
          align: 'left',
          width: '200px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.planningManagerName
        },
        {
          // 应收账款金额
          prop: 'factoringMoney',
          align: 'right',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.accountsReceivable,
          format: (row) => { return format.thousandFilter(row.factoringMoney) }
        },
        {
          // 期数
          prop: 'specialPlanPeriods',
          align: 'left',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.specialPlanPeriods,
          format: (row) => {
            if (row.specialPlanPeriods.toString() === '0') return ''
            return row.specialPlanPeriods
          }
        },
        {
          // 账款到期日
          prop: 'dueDate',
          align: 'center',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.dueDate,
          format: (row) => { return format.formatDateTpcModify(row.dueDate) === '1970-01-01' ? '' : format.formatDateTpcModify(row.dueDate) }
        },
        {
          // 区域
          prop: 'coreAreaName',
          align: 'left',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.region
        },
        {
          // 已有文件
          prop: 'files',
          align: 'left',
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.assetMaterialDetailDtoList,
          width: '200px',
          slot: true
        },
        {
          // 区域专员
          prop: 'coreAreaAttacheName',
          align: 'left',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.regionAttache
        },
        {
          // 确权文件生成状态
          prop: 'generateState',
          align: 'center',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.confirmDocGenState,
          slot: true
        },
        {
          // 业务流程状态
          prop: 'businessProcessStatus',
          align: 'center',
          width: '150px',
          // sortable: true,
          label: this.$i18n.messages[this.$i18n.locale].confirmationRightData.businessProcessStatus,
          slot: true
          // format: (row) => { return this.UtilJs.isEmpty(row.businessProcessStatus) ? '' : row.businessProcessStatus.toString() === '0' ? '' : format.formatDict(row.businessProcessStatus, 'ZD0085') }
        }
      ],
      sourceData: [],
      selectRows: []
    }
  },
  computed: {
    api () {
      return confirmationRightDataApi.confirmationRightDataList
    },
    exportQueryParas () {
      let aa = JSON.parse(JSON.stringify(this.exQueryParas))
      let keys = Object.keys(this.queryParas)
      keys.forEach(it => {
        if (this.UtilJs.isEmpty(aa[it]) || aa[it] === '') {
          delete aa[it]
        }
      })
      aa.coreArea = []
      var localeCoreArea = []
      if (this.UtilJs.isEmpty(aa.coreAreaId)) {
        delete aa.coreArea
      } else {
        aa.coreAreaId.forEach(it => {
          if (it.length > 0 && !this.UtilJs.isEmpty(it) && !this.UtilJs.isEmpty(it[1])) {
            localeCoreArea.push(it[1])
          }
        })
      }
      localeCoreArea.forEach(it => {
        if (!this.UtilJs.isEmpty(it)) {
          aa.coreArea.push(it)
        }
      })
      delete aa.coreAreaId
      return aa
    }
  },
  methods: {
    getTableData (data) {
      this.sourceData.forEach(it => {
        this.$set(it, 'filesLocal', [])
        this.$set(it, 'businessProcessStatusLocal', [])
        it.files.forEach(it1 => {
          it.filesLocal.push({ file: `${it1}` })
        })
        it.businessProcessStatus.forEach(it1 => {
          it.businessProcessStatusLocal.push({ businessProcessStatus: `${it1}` })
        })
      })
    },
    searchSelectChanged (obj) {
      if (Object.keys(obj).some(it => it === 'productIdInfo')) {
        delete this.queryParas.coreEnterpriseId
        delete this.queryParas.planningManagerId
        delete this.queryParas.initialOwnersId
      }
      if (obj.hasOwnProperty('projectIdInfo')) {
        if (obj.projectIdInfo && obj.projectIdInfo.keyId) {
          this.getTypeById(obj.projectIdInfo.keyId)
        } else {
          this.selectChangeLocal('1')
        }
      }
    },
    // 改变选择信息、日期
    selectChangeLocal (isAbs) {
      this.componentList[1].disabled = isAbs !== '1'
      if (this.componentList[1].disabled) {
        delete this.componentList[1].placeholder
        this.componentList[1].placeholder = ' '
      } else {
        this.componentList[1].placeholder = this.$i18n.messages[this.$i18n.locale].common.pleaseInput
      }
    },
    // 根据ID获取产品类别
    getTypeById (projectId) {
      componentsApi.productenterprise.getclassify({ projectId: projectId }).then(res => {
        var a = res.data ? res.data.productType : '2'
        this.selectChangeLocal(a)
      })
    },
    clearParam () {
      this.queryParas = {
        pageIndex: 1,
        fileBussType: '1',
        pageSize: 10
      }
      this.selectChangeLocal('1')
    },
    handleClick (row, emonType) {
      if (emonType === 'V') {
        this.item = Object.assign({}, row)
        this.visible = true
      } else if (emonType === 'L') {
        this.supplierItem = row.assetInfoId
        this.supplierVisible = true
      }
    },
    selectRowChange (selectRows) {
      this.selectRows = selectRows
      let data = []
      selectRows.forEach(it => {
        data.push(it.assetInfoId)
      })
      this.dataList = data
    },
    // 生成资料
    generateData () {
      if (this.selectRows.length === 0) {
        this.warning(this.reMsg.pleaseSelectOpearData)
        return
      }
      let generateFile = []
      this.selectRows.forEach(it => {
        generateFile.push({
          assetInfoId: it.assetInfoId,
          buildBussType: '6',
          generateName: this.$store.state.user.user.userName,
          generateor: this.$store.state.user.user.userId,
          ifForcedGeneration: this.forceAllFiles ? '1' : '0'
        })
      })
      this.generateMaterialLoading = true
      factorDataManageApi.factorGenerateData.approval(generateFile).then(res => {
        if (res.success) {
          // this.success('生成资料成功')
          this.formItem = Object.assign({}, { data: res.data })
          this.resultVisible = true
          this.coustomHandleFilter()
        } else {
          this.success('生成资料失败')
        }
      }).finally(() => {
        this.generateMaterialLoading = false
      })
    },
    // 下载
    downLoad (type) {
      if (this.selectRows.length === 0) {
        this.warning(this.regMsg.confirmationRightData.checklistMsg)
        return
      }
      let object = []
      let obj = {}
      this.selectRows.forEach(it => {
        object.push(it.assetInfoId)
      })
      obj.assetInfoIdList = object
      obj.fileClassifyList = type
      if (type.length === 2) {
        this.materialDownloadLoading = true
      } else {
        this.headquartersDataDownLoading = true
      }
      factorDataManageApi.downloadfactorGenerateData.fileDownLoad(obj).then(res => {
        if (res.success) {
          fileApi.file.downloadByUUID({ uuid: res.data, Encoding: 'utf-8' }).then(its => {
            downFile(its)
          })
        } else {
          this.warning(this.regMsg.confirmationRightData.downLoadFail)
        }
      }).finally(() => {
        this.materialDownloadLoading = false
        this.headquartersDataDownLoading = false
      })
    },
    getConfirmDocGenState (approvalStatus, approvalException) {
      let txt = ''
      if (approvalException) {
        txt = approvalException
      } else if (approvalStatus === '0') {
        txt = this.regMsg.confirmationRightData.notGenerated
      } else if (approvalStatus === '1') {
        txt = this.regMsg.confirmationRightData.alltGenerated
      } else if (approvalStatus && approvalStatus.includes('/')) {
        txt = `${this.regMsg.confirmationRightData.generated} ${approvalStatus}`
      } else {
        txt = approvalStatus || this.regMsg.confirmationRightData.notGenerated
      }
      return txt
    },
    coustomHandleFilter () {
      if (!this.UtilJs.isEmpty(this.queryParas.specialPlanPeriods) && !regExp.number.test(this.queryParas.specialPlanPeriods)) {
        return this.warning(this.$i18n.messages[this.$i18n.locale].expressDataList.specialPlanPeriodsCheck)
      }
      this.queryParas.coreArea = []
      if (this.UtilJs.isEmpty(this.queryParas.coreAreaId)) {
        delete this.queryParas.coreArea
      } else {
        this.queryParas.coreAreaId.forEach(it => {
          if (!this.UtilJs.isEmpty(it)) {
            this.queryParas.coreArea.push(it[1])
          }
        })
      }
      if (!this.queryParas.applicationDate || this.queryParas.applicationDate.length === 0) {
        delete this.queryParas.factoringApplyStartTime
        delete this.queryParas.factoringApplyEndTime
      } else {
        this.queryParas.factoringApplyStartTime = this.queryParas.applicationDate[0]
        this.queryParas.factoringApplyEndTime = this.queryParas.applicationDate[1]
      }
      if (!this.queryParas.addTime || this.queryParas.addTime.length === 0) {
        delete this.queryParas.planLadingStartTime
        delete this.queryParas.planLadingEndTime
      } else {
        this.queryParas.planLadingStartTime = this.queryParas.addTime[0]
        this.queryParas.planLadingEndTime = this.queryParas.addTime[1]
      }
      this.exQueryParas = JSON.parse(JSON.stringify(this.queryParas))
      this.handleFilter()
    }
  }
}
</script>
<style scoped lang="scss">
  @import '~@/styles/shourang/confirmationRightData/confirmationRightDataManageList.scss';
</style>
