<template>
  <div>
    <dialog-edit :visible.sync="dialogVisible" title="价格体系维护" width="1480px" :formRules="editModel === 'V' ? {} : editModel === 'R' ? {} : formRules" :footerVisible="true" :editModel="editModel" :api="api"
                 :form="priceForm" :autoSave="false" ref="dialog" :footerBtnShow="false">
      <dym-form :formValue.sync="priceForm" :componentList="componentList" @selectChanged="selectChanged">
      </dym-form>

      <!-- 资金价格列表 -->
      <el-form :model="priceForm" ref="priceForm">
        <data-table :showPage="false" :showSelection="this.editModel !== 'V' && this.editModel !== 'R'" :type="'selection'" @selectRowChange="selectRowChange"
                    @onDelsRow="onDelsRow" :sourceData.sync="priceForm.priceData" :columns="columns" ref="dataTable" cellClassName="price-table-cell-class"
                    operateBtnLayout="" :headTitle="$t('price.editPriceTitle')" :selectTable="selectTable">
          <template slot="headButton">
            <div class="headButton">
              <auth-button v-if="editModel !== 'V' && editModel !== 'R'" type="primary" size="medium"
                           :label="$t('common.create')" @click="addLimit" icon="iconfont iconxinzeng"></auth-button>
              <auth-button v-if="editModel !== 'V' && editModel !== 'R'" type="danger" size="medium"
                           :label="$t('common.del')" @click="delLimit" icon="iconfont iconshanchu"></auth-button>
            </div>
          </template>

          <!-- 资金规模下限 -->
          <template slot="fundLowLimit" slot-scope="scope">
            <!-- <span>{{scope.data.row.fundLowLimit}}</span> -->
            <span v-if="scope.data.$index === 0 || editModel === 'V' || editModel === 'R'">{{scope.data.row.fundLowLimit}}</span>
            <el-form-item class="padding-top22" v-else :prop="'priceData.' + scope.data.$index + '.fundLowLimit'" :rules="formRules1.fundLowLimit">
              <el-input v-model="scope.data.row.fundLowLimit"></el-input>
            </el-form-item>
          </template>

          <!-- 资金规模上限 -->
          <template slot="fundUpLimit" slot-scope="scope">
            <!-- <span>{{scope.data.row.fundUpLimit | formatLowLimit()}}</span> -->
            <span>{{scope.data.row.fundUpLimit}}</span>
            <!-- <span v-if="editModel === 'V' || editModel === 'R'">{{scope.data.row.fundUpLimit}}</span>
            <el-form-item class="padding-top22" v-else :prop="'priceData.' + scope.data.$index + '.fundUpLimit'" :rules="formRules1.fundUpLimit">
              <el-input v-model="scope.data.row.fundUpLimit"></el-input>
            </el-form-item> -->
          </template>

          <!-- 价格 -->
          <template slot="newPrice" slot-scope="scope">
            <span v-if="editModel === 'V' || editModel === 'R'">{{scope.data.row.newPrice}}</span>
            <el-form-item class="padding-top22" v-else :prop="'priceData.' + scope.data.$index + '.newPrice'" :rules="formRules1.newPrice">
              <el-input v-model="scope.data.row.newPrice"></el-input>
            </el-form-item>
          </template>
          <div slot="paginationLeft">
            <span>显示第{{endNum && '1' || 0}}至{{this.endNum}}项，共{{this.endNum}}项</span>
          </div>
        </data-table>
      </el-form>

      <div style="margin-top: 50px">
        <el-form :model="priceForm" v-if="this.editModel === 'R' || this.editModel === 'V'" ref="reviewForm">
          <!-- 复核单选 -->
          <el-row :gutter="10" v-if="this.editModel === 'R'">
            <el-col  :xs="8" :sm="8" :md="8" :lg="8">
              <el-form-item prop="reviewStatus" :label="$t('price.reviewResult')" label-width="80px" :rules="formRules2.reviewStatus">
                <el-radio-group v-model="priceForm.reviewStatus">
                  <el-radio :label="2">通过</el-radio>
                  <el-radio :label="3">不通过</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>

          <!-- 复核查看 -->
          <el-row :gutter="10" v-else>
            <el-col  :xs="8" :sm="8" :md="8" :lg="8">
              <el-form-item prop="showReviewStatus" :label="$t('price.reviewResult')" label-width="68px">
                <el-input v-model="priceForm.showReviewStatus" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
            <el-col  :xs="8" :sm="8" :md="8" :lg="8">
              <el-form-item prop="reviewUserName" :label="$t('price.reviewPerson')" label-width="55px">
                <el-input v-model="priceForm.reviewUserName" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
            <el-col  :xs="8" :sm="8" :md="8" :lg="8">
              <el-form-item prop="showModifyTime" :label="$t('price.reviewDate')" label-width="70px">
                <el-input v-model="priceForm.showModifyTime" :disabled="true"></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <!-- 复核意见 -->
          <el-row :gutter="10">
            <el-col  :xs="24" :sm="24" :md="24" :lg="24">
              <el-form-item prop="reviewSuggestion" :label="$t('price.reviewOpinion')" :label-width="this.editModel === 'R' ? '80px' : '68px'" :rules="this.editModel === 'R' ? formRules2.reviewSuggestion : {}">
                <el-input v-model="priceForm.reviewSuggestion" :disabled="this.editModel === 'V'" type="textarea" :maxlength="500"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div class="edit_footer" slot="footer">
        <auth-button v-if="this.editModel === 'E' || this.editModel === 'P' || this.editModel === 'C'" size="" type="primary" :label="$t('common.save')" @click="save('save')"></auth-button>
        <auth-button v-if="this.editModel === 'E' || this.editModel === 'P' || this.editModel === 'C'" size="" type="primary" :label="$t('common.apply')" @click="save('apply')"></auth-button>
        <auth-button v-if="this.editModel === 'R'" size="" type="primary" :label="$t('common.assign')" @click="save('review')"></auth-button>
        <auth-button size="" :label="$t('common.close')" @click="dialogVisible = false"></auth-button>
      </div>
    </dialog-edit>
  </div>
</template>

<script>
import BaseEdit from '@/pages/baseEditPage'
import { DialogEdit, DataTable, dymForm, authButton, SelectProductNameCascade, SelectCoreEnterpriseCascade, SelectFinancialInstitutionsCascade } from 'newepoch-components'
import rateApi from '@/api/rateApi'
import * as format from '@/filters/index'
import { regExp } from '@/validator/index'
import componentsApi from '@/api/componentsApi'
export default {
  extends: new BaseEdit('priceSys'),
  components: {
    DialogEdit,
    dymForm,
    DataTable,
    authButton
  },
  data () {
    const { price } = this.$i18n.messages[this.$i18n.locale]
    return {
      clearFlag: false,
      menuFlag: false,
      priceAdSuccessFlag: false,
      priceAdSuccessItem: {},
      priceForm: {
        priceData: []
      },
      editFlag: false,
      formRules: {
        productType: [{
          required: true,
          message: '请选择产品类别',
          trigger: ['blur', 'change']
        }],
        projectId: [{
          required: true,
          message: '请选择产品名称',
          trigger: ['blur', 'change']
        }],
        effectiveDate: [{
          required: true,
          message: '请选择生效日期',
          trigger: ['blur', 'change']
        }],
        coreEnterpriseId: [{
          required: true,
          message: '请选择核心企业',
          trigger: ['blur', 'change']
        }],
        planningManagerId: [{
          required: true,
          message: '请选择再保理银行',
          trigger: ['blur', 'change']
        }]
        // initialEquityOwnerId: [{
        //   required: true,
        //   message: '请选择原始权益人',
        //   trigger: ['blur', 'change']
        // }],
        // assetServiceInstitutionId: [{
        //   required: true,
        //   message: '请选择资产服务机构',
        //   trigger: ['blur', 'change']
        // }]
      },
      formRules1: {
        // fundUpLimit: [{
        //   required: true,
        //   message: '请输入资产规模上限',
        //   trigger: ['blur']
        // }, {
        //   validator: this.fundUpLimitCheck,
        //   trigger: 'blur'
        // }],
        fundLowLimit: [{
          required: true,
          message: '请输入资产规模下限',
          trigger: ['blur']
        }, {
          validator: this.fundLowLimitCheck,
          trigger: 'blur'
        }],
        newPrice: [{
          required: true,
          message: '请输入价格',
          trigger: ['blur']
        }, {
          validator: this.priceCheck,
          trigger: 'blur'
        }]
      },
      formRules2: {
        reviewStatus: [{
          required: true,
          message: '请选择复核结果',
          trigger: ['blur']
        }],
        reviewSuggestion: [{
          required: true,
          message: '请填写不通过原因',
          trigger: ['blur']
        }]
      },
      componentList: [
        // 产品类别
        {
          label: price.productType,
          labelWidth: '170px',
          value: 'productType',
          cols: [8, 8, 8, 8],
          dictTypeCode: 'ZD0087',
          componentName: 'SelectDictionary',
          store: this.$store,
          prop: 'productType'
        },
        // 产品名称
        {
          label: this.$i18n.messages[this.$i18n.locale].price.productName,
          value: 'projectId',
          cols: [8, 8, 8, 8],
          labelWidth: '95px',
          componentName: SelectProductNameCascade,
          queryName: 'productType',
          queryValue: 'productType',
          name: 'project',
          prop: 'projectId'
        },
        // 核心企业
        {
          label: this.$i18n.messages[this.$i18n.locale].price.coreEnterprises,
          value: 'coreEnterpriseId',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          componentName: SelectCoreEnterpriseCascade,
          queryName: 'projectId',
          queryValue: 'projectId',
          name: 'coreEnterprise',
          prop: 'coreEnterpriseId'
        },
        // 计划管理人
        {
          label: this.$i18n.messages[this.$i18n.locale].price.refactorBank,
          value: 'planningManagerId',
          cols: [8, 8, 8, 8],
          labelWidth: '170px',
          componentName: SelectFinancialInstitutionsCascade,
          queryName: 'projectId',
          queryValue: 'projectId',
          name: 'planningManager',
          prop: 'planningManagerId'
        },
        // 原始权益人
        {
          label: price.initialEquityOwner,
          labelWidth: '95px',
          disabled: true,
          value: 'initialEquityOwner',
          placeholder: '',
          cols: [8, 8, 8, 8],
          componentName: 'el-input'
        },
        // 资产服务机构
        {
          label: price.assetServiceInstitution,
          labelWidth: '110px',
          disabled: true,
          value: 'assetServiceInstitution',
          placeholder: '',
          cols: [8, 8, 8, 8],
          componentName: 'el-input'
        },
        // 生效日期
        {
          label: price.effectiveDate,
          labelWidth: '170px',
          value: 'effectiveDate',
          placeholder: '请选择',
          cols: [8, 8, 8, 8],
          componentName: 'el-date-picker',
          prop: 'effectiveDate'
        }
      ],
      columns: [
        // 资金规模下限
        {
          prop: 'fundLowLimit',
          align: 'right',
          label: price.downLimit,
          slot: true
        },
        // 资金规模上限
        {
          prop: 'fundUpLimit',
          align: 'right',
          label: price.upLimit,
          slot: true
        },
        // 价格
        {
          prop: 'newPrice',
          align: 'right',
          label: price.price,
          slot: true
        }
      ]
    }
  },
  computed: {
    api () {
      return rateApi.priceSysApi
    },
    dialogVisible: {
      get: function () {
        return this.visible
      },
      set: function (value) {
        this.$emit('update:visible', value)
      }
    },
    endNum () {
      return this.priceForm.priceData.length || 0
    }
  },
  watch: {
    dialogVisible (value) {
      this.clearFlag = false
      if (value) {
        // 查询数据
        if (this.editModel !== 'C') {
          rateApi.priceSysApi.getList(this.form.keyId).then(res => {
            if (res && res.data && res.data.length !== 0) {
              this.priceForm = res.data
              this.priceForm.priceData = res.data.fundPirceList
              // 格式化价格
              this.priceForm.priceData.forEach(item => {
                this.$set(item, 'newPrice', format.accMul(item.price, 100))
              })
              // 格式化复核查看
              this.$set(this.priceForm, 'showReviewStatus', format.formatDict(this.priceForm.reviewStatus, 'I0001'))
              this.$set(this.priceForm, 'showModifyTime', format.formatDatetime(this.priceForm.modifyTime))
              // 格式化原始权益人、资产服务机构
              if (this.priceForm.initialEquityOwnerId === '0') {
                this.priceForm.initialEquityOwnerId = ''
              }
              if (this.priceForm.assetServiceInstitutionId === '0') {
                this.priceForm.assetServiceInstitutionId = ''
              }
              this.priceForm.priceData[this.priceForm.priceData.length - 1].fundUpLimit = ''
            }
          })
        } else {
          this.$set(this.priceForm, 'projectId', '')
          this.$set(this.priceForm, 'coreEnterpriseId', '')
          this.$set(this.priceForm, 'planningManagerId', '')
          this.priceForm.priceData.push(
            {
              fundLowLimit: 0,
              fundUpLimit: '',
              newPrice: ''
            }
          )
          // this.priceForm.projectId = ''
          // this.priceForm.coreEnterpriseId = ''
          // this.priceForm.planningManagerId = ''
        }
        // 修改禁选项
        if (this.editModel === 'E' || this.editModel === 'P' || this.editModel === 'C') {
          this.$set(this.componentList[0], 'disabled', false)
          this.$set(this.componentList[1], 'disabled', false)
          this.$set(this.componentList[2], 'disabled', false)
          this.$set(this.componentList[3], 'disabled', false)
          this.$set(this.componentList[6], 'disabled', false)
        } else {
          // 修改禁选项
          this.$set(this.componentList[0], 'disabled', true)
          this.$set(this.componentList[1], 'disabled', true)
          this.$set(this.componentList[2], 'disabled', true)
          this.$set(this.componentList[3], 'disabled', true)
          this.$set(this.componentList[6], 'disabled', true)
        }
      } else {
        if (this.editModel === 'R' || this.editModel === 'V') {
          // 清空验证
          this.$refs['reviewForm'].clearValidate()
        }
        this.priceForm = {
          priceData: []
        }
      }
    },
    'priceForm.reviewStatus' (now, old) {
      if (now === 2) {
        this.formRules2.reviewSuggestion[0].required = false
        this.$refs['reviewForm'].clearValidate()
      } else {
        this.formRules2.reviewSuggestion[0].required = true
      }
    },
    'priceForm.productType' (now, old) {
      if (!this.clearFlag) {
        return
      }
      if (now !== old && this.clearFlag) {
        this.priceForm.projectId = ''
        this.priceForm.coreEnterpriseId = ''
        this.priceForm.planningManagerId = ''
      }
    },
    'priceForm.projectId' (now, old) {
      if (!this.clearFlag) {
        this.clearFlag = true
        return
      }
      if (now !== old && this.clearFlag) {
        if (now !== '') {
          // 修改原始权益人
          componentsApi.productenterprise.getEnterpriseList({
            enterpriseType: '50',
            projectId: now
          }).then(res => {
            if (res.success && res.data) {
              this.$set(this.priceForm, 'initialEquityOwner', res.data[0].enterpriseName)
              this.$set(this.priceForm, 'initialEquityOwnerId', res.data[0].enterpriseId)
            } else {
              this.$set(this.priceForm, 'initialEquityOwner', '')
              this.$set(this.priceForm, 'initialEquityOwnerId', '')
            }
          })
          // 修改资产服务机构
          componentsApi.productenterprise.getEnterpriseList({
            enterpriseType: '120',
            projectId: now
          }).then(res => {
            if (res.success && res.data) {
              this.$set(this.priceForm, 'assetServiceInstitution', res.data[0].enterpriseName)
              this.$set(this.priceForm, 'assetServiceInstitutionId', res.data[0].enterpriseId)
            } else {
              this.$set(this.priceForm, 'assetServiceInstitution', '')
              this.$set(this.priceForm, 'assetServiceInstitutionId', '')
            }
          })
        } else {
          this.priceForm.initialEquityOwnerId = ''
          this.priceForm.initialEquityOwner = ''
          this.priceForm.assetServiceInstitutionId = ''
          this.priceForm.assetServiceInstitution = ''
        }
        this.priceForm.coreEnterpriseId = ''
        this.priceForm.planningManagerId = ''
      }
    }
  },
  methods: {
    // 禁用第一行
    selectTable (row, index) {
      if (!index) {
        return false
      } else {
        return true
      }
    },
    // 复选框勾选数据
    selectRowChange (val) {
      this.priceForm.priceData.forEach((item, index) => {
        item.index = index
      })
      // 删除时修改资产规模上限
      if (val === 'index') {
        this.priceForm.priceData.forEach((item, index) => {
          if (index !== 0) {
            item.fundLowLimit = this.priceForm.priceData[index - 1].fundUpLimit
          }
        })
      }
    },
    // 新增
    addLimit () {
      this.$refs['priceForm'].validate(valid => {
        if (valid) {
          if (this.priceForm.priceData.length === 0) {
            this.priceForm.priceData.push(
              {
                fundLowLimit: 0,
                fundUpLimit: '',
                newPrice: ''
              }
            )
          } else {
            this.priceForm.priceData[this.priceForm.priceData.length - 1].fundUpLimit = ''
            this.priceForm.priceData.push(
              {
                fundLowLimit: '',
                fundUpLimit: '',
                newPrice: ''
              }
            )
          }
          this.selectRowChange('index')
        } else {
          this.warning('请先将表单填写完整')
        }
      })
    },
    // 删除
    delLimit () {
      this.$refs['dataTable'].showDels()
    },
    // 删除
    onDelsRow (selectionData) {
      let flag = selectionData.some(item => {
        if (item.index === 0) {
          return true
        }
      })
      if (!flag) {
        selectionData.forEach(item => {
          this.priceForm.priceData.forEach((issue, index) => {
            if (issue.index === item.index) {
              this.priceForm.priceData.splice(index, 1)
            }
          })
        })
        this.selectRowChange('index')
      } else {
        this.warning('第一条价格体系不能删除')
      }
    },
    // 校验资金规模下限
    // fundUpLimitCheck (rule, value, callback) {
    //   if (!regExp.fundUpLimit.test(value)) {
    //     callback(new Error('格式错误,请输入数字：整数位最多14位，小数位最多6位'))
    //   }
    //   let index = Number(rule.field.split('.')[1])
    //   if (index !== this.priceForm.priceData.length - 1) {
    //     this.priceForm.priceData[index + 1].fundLowLimit = value
    //   }
    //   const { fundLowLimit: preVal, fundUpLimit: now } = this.priceForm.priceData[index]
    //   let nextFundUpLimit = ''
    //   if (index !== this.priceForm.priceData.length - 1) {
    //     nextFundUpLimit = this.priceForm.priceData[index + 1].fundUpLimit
    //   }
    //   if (preVal >= now) {
    //     callback(new Error('输入有误：资产下限应大于资产下限'))
    //   } else if (value >= nextFundUpLimit && nextFundUpLimit !== '') {
    //     callback(new Error('输入有误：该行资产下限应小于下一行资产下限'))
    //   } else {
    //     callback()
    //   }
    // },
    // 同步资金规模上限
    fundLowLimitChange (rule, value, callback) {
      // let index = Number(rule.field.split('.')[1])
      // this.priceForm.priceData[index - 1].fundUpLimit = value
      // callback()
    },
    // 校验资金规模下限
    fundLowLimitCheck (rule, value, callback) {
      if (!regExp.fundUpLimit.test(value)) {
        callback(new Error('格式错误,请输入数字：整数位最多14位，小数位最多6位'))
        return
      }
      let index = Number(rule.field.split('.')[1])
      const { fundUpLimit: preVal, fundLowLimit: now } = this.priceForm.priceData[index]
      let lastFundLowLimit = this.priceForm.priceData[index - 1].fundLowLimit
      if (Number(now) >= Number(preVal) && preVal !== '' && preVal !== '') {
        callback(new Error('输入有误：资产下限应小于资产上限'))
      } else if (Number(value) <= Number(lastFundLowLimit) && lastFundLowLimit !== '') {
        callback(new Error('输入有误：该行资产下限应大于上一行资产下限'))
      } else {
        this.priceForm.priceData[index - 1].fundUpLimit = value
        callback()
      }
    },
    clearValidate () {
      // this.$refs['priceForm'].validate()
    },
    // 价格校验
    priceCheck (rule, value, callback) {
      if (!regExp.price.test(value)) {
        callback(new Error('格式错误,请输入数字：最大输入100，小数位最多6位'))
      }
      let index = Number(rule.field.split('.')[1])
      let preVal = ''
      let nextVal = ''
      if (index > 0) {
        preVal = Number(this.priceForm.priceData[index - 1].newPrice)
      }
      if (index !== this.priceForm.priceData.length - 1) {
        nextVal = Number(this.priceForm.priceData[index + 1].newPrice)
      }
      if (preVal !== '' && preVal <= Number(value)) {
        callback(new Error('输入有误：该行价格应小于上一行价格'))
      } else if (nextVal !== '' && Number(value) <= nextVal) {
        callback(new Error('输入有误：该行价格应大于下一行价格'))
      } else {
        callback()
      }
    },
    // 保存
    save (saveType) {
      let flag = true
      let editModel = this.editModel
      // 新增、编辑、复制模式
      this.$refs['priceForm'].validate(valid => {
        if (!valid) {
          flag = false
        }
      })
      this.$refs['dialog'].$refs['editForm'].validate(valid => {
        if (!valid) {
          flag = false
        }
      })
      if (editModel === 'R') {
        this.$refs['priceForm'].validate(valid => {
          if (!valid) {
            flag = false
          }
        })
      }
      if (flag) {
        if (this.priceForm.priceData.length === 0) {
          this.error('没有对应的资金价格体系')
          return
        }
        this.priceForm.priceData[this.priceForm.priceData.length - 1].fundUpLimit = -1
        let newForm = JSON.parse(JSON.stringify(this.priceForm))
        newForm.priceData.forEach(item => {
          this.$set(item, 'price', Number(item.newPrice / 100))
        })
        newForm.fundPirceList = newForm.priceData
        if (editModel === 'C' || editModel === 'E') {
          if (newForm.assetServiceInstitutionId === '') {
            newForm.assetServiceInstitutionId = '0'
          }
          if (newForm.initialEquityOwnerId === '') {
            newForm.initialEquityOwnerId = '0'
          }
          rateApi.priceSysApi[saveType](newForm).then(res => {
            if (res && res.code === '0') {
              this.success(editModel === 'C' ? '新增成功!' : saveType === 'save' ? '编辑成功' : '申请成功')
              this.dialogVisible = false
              this.$emit('handleFilter')
            }
          })
        } else if (editModel === 'P') {
          // 复制模式只保存主表、附表数据
          let copyForm = {
            productType: newForm.productType,
            projectId: newForm.projectId,
            projectName: newForm.projectName,
            coreEnterprise: newForm.coreEnterprise,
            coreEnterpriseId: newForm.coreEnterpriseId,
            effectiveDate: newForm.effectiveDate,
            planningManagerId: newForm.planningManagerId,
            planningManagerName: newForm.planningManagerName,
            initialEquityOwner: newForm.initialEquityOwner,
            initialEquityOwnerId: newForm.initialEquityOwnerId,
            assetServiceInstitution: newForm.assetServiceInstitution,
            assetServiceInstitutionId: newForm.assetServiceInstitutionId,
            fundPirceList: newForm.fundPirceList
          }
          copyForm.fundPirceList.forEach(item => {
            delete item.keyId
          })
          rateApi.priceSysApi[saveType](copyForm).then(res => {
            if (res && res.code === '0') {
              this.success('复制成功')
              this.dialogVisible = false
              this.$emit('handleFilter')
            }
          })
        } else {
          // 复核模式
          let data = {
            keyId: this.form.keyId,
            reviewStatus: this.priceForm.reviewStatus,
            reviewSuggestion: this.priceForm.reviewSuggestion
          }
          rateApi.priceSysApi.review(data).then(res => {
            if (res && res.code === '0') {
              this.success('复核成功')
              this.dialogVisible = false
              this.$emit('handleFilter')
            }
          })
        }
      } else {
        this.error('表单填写有误，请检查')
        return
      }
      this.priceForm.priceData[this.priceForm.priceData.length - 1].fundUpLimit = ''
    },
    selectChanged (obj, index) {
      let $this = this
      if (!$this.UtilJs.isEmpty(obj.projectInfo)) {
        this.priceForm.projectName = obj.projectInfo.projectName
      } else if (!$this.UtilJs.isEmpty(obj.coreEnterpriseInfo)) {
        this.priceForm.coreEnterprise = obj.coreEnterpriseInfo.enterpriseName
      } else if (!$this.UtilJs.isEmpty(obj.planningManagerInfo)) {
        this.priceForm.planningManagerName = obj.planningManagerInfo.enterpriseName
      } else {}
    }
  }
  // 资金规模下限format
  // filters: {
  //   formatLowLimit (val) {
  //     if (val === '-1') {
  //       return '+∞'
  //     } else {
  //       return val
  //     }
  //   }
  // }
}
</script>
<style lang="scss" scoped>
  @import '~@/styles/rate/priceSysList.scss';
</style>
