<template>
  <el-tabs type="border-card">
    <!-- 全部table页 -->
    <el-tab-pane label="全部">
      <el-card class="fiche">
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
        <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
        <div  style="float: right;margin-right:1%">
          <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"  style="float: ;">重置</el-button>
        </div>
        <hr  style="margin-top: 16px;">
        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="融资编号" prop="zfrNumber">
            <el-input
              v-model="queryParams.zfrNumber"
              placeholder="请输入融资编号"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-form>
      </el-card>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['finance:record:add']"
          >申请融资</el-button>
        </el-col>
      </el-row>
      <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
        <el-table-column label="序号" type="index" width="50" align="center">
          <template slot-scope="scope">
            <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
          </template>
        </el-table-column>
        <el-table-column label="融信编号" align="center" prop="zfiNumner" />
        <el-table-column label="融资编号" align="center" prop="zfrNumber" />
        <el-table-column label="开立方" align="center" prop="coreScyName" />
        <el-table-column label="融资金额" align="center" prop="zfrAmount" />
        <el-table-column label="融资利率" align="center" prop="zfrRate" />
        <el-table-column label="经办人" align="center" prop="zfrHandler" />
        <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
        <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
        <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
        <el-table-column label="融资状态" align="center" prop="zfrStatus" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleDetail(scope.row)"
              v-hasPermi="['finance:record:query']"
            >详情</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['sc-service:record:remove']"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-tab-pane>
    <!-- 融资中table页 -->
    <el-tab-pane label="融资中">
      <el-card class="fiche">
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
        <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
        <div  style="float: right;margin-right:1%">
          <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQueryIng">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQueryIng"  style="float: ;">重置</el-button>
        </div>
        <hr  style="margin-top: 16px;">
        <el-form :model="queryParamsIng" ref="queryFormIng" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="融资编号" prop="zfrNumber">
            <el-input
              v-model="queryParamsIng.zfrNumber"
              placeholder="请输入融资编号"
              clearable
              size="small"
              @keyup.enter.native="handleQueryIng"
            />
          </el-form-item>
        </el-form>
      </el-card>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['finance:record:add']"
          >申请融资</el-button>
        </el-col>
      </el-row>
      <el-table v-loading="loadingIng" :data="recordIngList" @selection-change="handleSelectionChangeIng">
        <el-table-column label="序号" type="index" width="50" align="center">
          <template slot-scope="scope">
            <span>{{(queryParamsIng.pageNum - 1) * queryParamsIng.pageSize + scope.$index + 1}}</span>
          </template>
        </el-table-column>
        <el-table-column label="融信编号" align="center" prop="zfiNumner" />
        <el-table-column label="融资编号" align="center" prop="zfrNumber" />
        <el-table-column label="开立方" align="center" prop="coreScyName" />
        <el-table-column label="融资金额" align="center" prop="zfrAmount" />
        <el-table-column label="融资利率" align="center" prop="zfrRate" />
        <el-table-column label="经办人" align="center" prop="zfrHandler" />
        <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
        <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
        <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
        <el-table-column label="融资状态" align="center" prop="zfrStatus" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['sc-service:record:edit']"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['sc-service:record:remove']"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    
      <pagination
        v-show="totalIng>0"
        :total="totalIng"
        :page.sync="queryParamsIng.pageNum"
        :limit.sync="queryParamsIng.pageSize"
        @pagination="getList"
      />
    </el-tab-pane>
    <!-- 已放款table页 -->
    <el-tab-pane label="已放款">
      <el-card class="fiche">
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
        <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
        <div  style="float: right;margin-right:1%">
          <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQueryEnd">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQueryEnd"  style="float: ;">重置</el-button>
        </div>
        <hr  style="margin-top: 16px;">
        <el-form :model="queryParamsEnd" ref="queryFormEnd" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="融资编号" prop="zfrNumber">
            <el-input
              v-model="queryParamsEnd.zfrNumber"
              placeholder="请输入融资编号"
              clearable
              size="small"
              @keyup.enter.native="handleQueryEnd"
            />
          </el-form-item>
        </el-form>
      </el-card>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['finance:record:add']"
          >申请融资</el-button>
        </el-col>
      </el-row>
      <el-table v-loading="loadingEnd" :data="recordEndList" @selection-change="handleSelectionChange">
        <el-table-column label="序号" type="index" width="50" align="center">
          <template slot-scope="scope">
            <span>{{(queryParamsEnd.pageNum - 1) * queryParamsEnd.pageSize + scope.$index + 1}}</span>
          </template>
        </el-table-column>
        <el-table-column label="融信编号" align="center" prop="zfiNumner" />
        <el-table-column label="融资编号" align="center" prop="zfrNumber" />
        <el-table-column label="开立方" align="center" prop="coreScyName" />
        <el-table-column label="融资金额" align="center" prop="zfrAmount" />
        <el-table-column label="融资利率" align="center" prop="zfrRate" />
        <el-table-column label="经办人" align="center" prop="zfrHandler" />
        <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
        <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
        <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
        <el-table-column label="融资状态" align="center" prop="zfrStatus" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['sc-service:record:edit']"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['sc-service:record:remove']"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    
      <pagination
        v-show="totalEnd>0"
        :total="totalEnd"
        :page.sync="queryParamsEnd.pageNum"
        :limit.sync="queryParamsEnd.pageSize"
        @pagination="getList"
      />
    </el-tab-pane>
    <!-- 融资失败table页 -->
    <el-tab-pane label="融资失败">
      <el-card class="fiche">
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
        <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
        <div  style="float: right;margin-right:1%">
          <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQueryLose">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQueryLose"  style="float: ;">重置</el-button>
        </div>
        <hr  style="margin-top: 16px;">
        <el-form :model="queryParamsLose" ref="queryFormLose" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="融资编号" prop="zfrNumber">
            <el-input
              v-model="queryParamsLose.zfrNumber"
              placeholder="请输入融资编号"
              clearable
              size="small"
              @keyup.enter.native="handleQueryLose"
            />
          </el-form-item>
        </el-form>
      </el-card>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['finance:record:add']"
          >申请融资</el-button>
        </el-col>
      </el-row>
      <el-table v-loading="loadingLose" :data="recordLoseList" @selection-change="handleSelectionChange">
        <el-table-column label="序号" type="index" width="50" align="center">
          <template slot-scope="scope">
            <span>{{(queryParamsLose.pageNum - 1) * queryParamsLose.pageSize + scope.$index + 1}}</span>
          </template>
        </el-table-column>
        <el-table-column label="融信编号" align="center" prop="zfiNumner" />
        <el-table-column label="融资编号" align="center" prop="zfrNumber" />
        <el-table-column label="开立方" align="center" prop="coreScyName" />
        <el-table-column label="融资金额" align="center" prop="zfrAmount" />
        <el-table-column label="融资利率" align="center" prop="zfrRate" />
        <el-table-column label="经办人" align="center" prop="zfrHandler" />
        <el-table-column label="承诺还款时间" align="center" prop="zfrRepaymentDate" width="180"/>
        <el-table-column label="融资申请日期" align="center" prop="zfrApplyDate" width="180"/>
        <el-table-column label="融资放款日期" align="center" prop="zfrLoanDate" width="180"/>
        <el-table-column label="融资状态" align="center" prop="zfrStatus" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleDetail(scope.row)"
              v-hasPermi="['finance:record:query']"
            >详情</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['sc-service:record:remove']"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    
      <pagination
        v-show="totalLose>0"
        :total="totalLose"
        :page.sync="queryParamsLose.pageNum"
        :limit.sync="queryParamsLose.pageSize"
        @pagination="getList"
      />
    </el-tab-pane>
    <!-- 添加或修改融资记录对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="融信ID(zc_finance_inf.zfi_id)" prop="zfrFinanceId">
          <el-input v-model="form.zfrFinanceId" placeholder="请输入融信ID(zc_finance_inf.zfi_id)" />
        </el-form-item>
        <el-form-item label="融资编号" prop="zfrNumber">
          <el-input v-model="form.zfrNumber" placeholder="请输入融资编号" />
        </el-form-item>
        <el-form-item label="融资金额" prop="zfrAmount">
          <el-input v-model="form.zfrAmount" placeholder="请输入融资金额" />
        </el-form-item>
        <el-form-item label="融资利率" prop="zfrRate">
          <el-input v-model="form.zfrRate" placeholder="请输入融资利率" />
        </el-form-item>
        <el-form-item label="经办人" prop="zfrHandler">
          <el-input v-model="form.zfrHandler" placeholder="请输入经办人" />
        </el-form-item>
        <el-form-item label="承诺还款时间" prop="zfrRepaymentDate">
          <el-date-picker clearable size="small"
            v-model="form.zfrRepaymentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择承诺还款时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="融资申请日期" prop="zfrApplyDate">
          <el-date-picker clearable size="small"
            v-model="form.zfrApplyDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择融资申请日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="融资放款日期" prop="zfrLoanDate">
          <el-date-picker clearable size="small"
            v-model="form.zfrLoanDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择融资放款日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="已还款金额" prop="zfrApplyAmount">
          <el-input v-model="form.zfrApplyAmount" placeholder="请输入已还款金额" />
        </el-form-item>
        <el-form-item label="还款方式(0:线下, 1:线上)" prop="zfrApplyType">
          <el-select v-model="form.zfrApplyType" placeholder="请选择还款方式(0:线下, 1:线上)">
            <el-option label="请选择字典生成" value="" />
          </el-select>
        </el-form-item>
        <el-form-item label="状态">
          <el-radio-group v-model="form.zfrStatus">
            <el-radio label="1">请选择字典生成</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="审批状态(00:审核中 01:审批退回)" prop="zfrApproveStt">
          <el-input v-model="form.zfrApproveStt" placeholder="请输入审批状态(00:审核中 01:审批退回)" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </el-tabs>
</template>

<script>
import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/service/financeRecord/record";
import Cookies from 'js-cookie'
export default {
  name: "finaceRecord",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      loadingIng: true,
      loadingEnd: true,
      loadingLose: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      totalIng: 0,
      totalEnd: 0,
      totalLose: 0,
      // 全部融资记录表格数据
      recordList: [],
      // 融资中融资记录表格数据
      recordIngList: [],
      // 已放款融资记录表格数据
      recordEndList: [],
      // 融资失败融资记录表格数据
      recordLoseList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        zfrFinanceId: null,
        zfrNumber: null,
        zfrAmount: null,
        zfrRate: null,
        zfrHandler: null,
        zfrRepaymentDate: null,
        zfrApplyDate: null,
        zfrLoanDate: null,
        zfrApplyAmount: null,
        zfrApplyType: null,
        zfrStatus: null,
        zfrApproveStt: null,
      },
      queryParamsIng: {
        pageNum: 1,
        pageSize: 10,
        zfrFinanceId: null,
        zfrNumber: null,
        zfrAmount: null,
        zfrRate: null,
        zfrHandler: null,
        zfrRepaymentDate: null,
        zfrApplyDate: null,
        zfrLoanDate: null,
        zfrApplyAmount: null,
        zfrApplyType: null,
        zfrStatus: null,
        zfrApproveStt: null,
      },
      queryParamsEnd: {
        pageNum: 1,
        pageSize: 10,
        zfrFinanceId: null,
        zfrNumber: null,
        zfrAmount: null,
        zfrRate: null,
        zfrHandler: null,
        zfrRepaymentDate: null,
        zfrApplyDate: null,
        zfrLoanDate: null,
        zfrApplyAmount: null,
        zfrApplyType: null,
        zfrStatus: null,
        zfrApproveStt: null,
      },
      queryParamsLose: {
        pageNum: 1,
        pageSize: 10,
        zfrFinanceId: null,
        zfrNumber: null,
        zfrAmount: null,
        zfrRate: null,
        zfrHandler: null,
        zfrRepaymentDate: null,
        zfrApplyDate: null,
        zfrLoanDate: null,
        zfrApplyAmount: null,
        zfrApplyType: null,
        zfrStatus: null,
        zfrApproveStt: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        zfrFinanceId: [
          { required: true, message: "融信ID(zc_finance_inf.zfi_id)不能为空", trigger: "blur" }
        ],
        zfrAmount: [
          { required: true, message: "融资金额不能为空", trigger: "blur" }
        ],
        zfrRate: [
          { required: true, message: "融资利率不能为空", trigger: "blur" }
        ],
        zfrHandler: [
          { required: true, message: "经办人不能为空", trigger: "blur" }
        ],
        zfrStatus: [
          { required: true, message: "状态不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.getIngList();
    this.getEndList();
    this.getLoseList();
  },
  methods: {
    /** 查询全部融资记录列表 */
    getList() {
      this.loading = true;
      listRecord(this.queryParams).then(response => {
        debugger
        this.recordList = response.data.records;
        this.total = response.data.total;
        this.loading = false;
      });
    },
    /** 查询融资中融资记录列表 */
    getIngList() {
      this.loadingIng = true;
      this.queryParamsIng.zfrStatus = '00';
      listRecord(this.queryParamsIng).then(response => {
        this.recordIngList = response.data.records;
        this.totalIng = response.data.total;
        this.loadingIng = false;
      });
    },
    /** 查询已放款融资记录列表 */
    getEndList() {
      this.loadingEnd = true;
      this.queryParamsEnd.zfrStatus = '01';
      listRecord(this.queryParamsEnd).then(response => {
        this.recordEndList = response.data.records;
        this.totalIng = response.data.total;
        this.loadingEnd = false;
      });
    },
    /** 查询融资失败融资记录列表 */
    getLoseList() {
      this.loadingLose = true;
      this.queryParamsLose.zfrStatus = '02';
      listRecord(this.queryParamsLose).then(response => {
        this.recordLoseList = response.data.records;
        this.totalEnd = response.data.total;
        this.loadingLose = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        zfrId: null,
        zfrFinanceId: null,
        zfrNumber: null,
        zfrAmount: null,
        zfrRate: null,
        zfrHandler: null,
        zfrRepaymentDate: null,
        zfrApplyDate: null,
        zfrLoanDate: null,
        zfrApplyAmount: null,
        zfrApplyType: null,
        zfrStatus: "0",
        zfrApproveStt: null,
        zfrProfitSpare1: null,
        zfrProfitSpare2: null,
        zfrProfitSpare3: null,
        zfrProfitSpare4: null,
        zfrProfitSpare5: null,
        zfrProfitSpare6: null,
        zfrProfitSpare7: null,
        zfrProfitSpare8: null,
        zfrProfitSpare9: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      };
      this.resetForm("form");
    },
    /** 全部搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 全部重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    /** 融资中搜索按钮操作 */
    handleQueryIng() {
      this.queryParamsIng.pageNum = 1;
      this.getList();
    },
    /**融资中重置按钮操作 */
    resetQueryIng() {
      this.resetForm("queryFormIng");
      this.handleQueryIng();
    },
    /** 已放款搜索按钮操作 */
    handleQueryEnd() {
      this.queryParamsEnd.pageNum = 1;
      this.getList();
    },
    /**已放款重置按钮操作 */
    resetQueryEnd() {
      this.resetForm("queryFormEnd");
      this.handleQueryEnd();
    },
    /** 融资失败搜索按钮操作 */
    handleQueryLose() {
      this.queryParamsLose.pageNum = 1;
      this.getList();
    },
    /*融资失败重置按钮操作 */
    resetQueryLose() {
      this.resetForm("queryFormLose");
      this.handleQueryLose();
    },
    //全部 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.zfrId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    // 融资中多选框选中数据
    handleSelectionChangeIng(selection) {
      this.ids = selection.map(item => item.zfrId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      Cookies.set("/financeRecord/addFinanceRecord/", this.$route.fullPath)
      this.$router.push("/financeRecord/addFinanceRecord/");
      // this.reset();
      // this.open = true;
      // this.title = "添加融资记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const zfrId = row.zfrId || this.ids
      getRecord(zfrId).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改融资记录";
      });
    },
    handleDetail(row){
      this.reset();
      const zfrId = row.zfrId || this.ids
      Cookies.set("/financeRecord/detailFinanceRecord/" + zfrId, this.$route.fullPath)
      this.$router.push("/financeRecord/detailFinanceRecord/" + zfrId);
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.zfrId != null) {
            updateRecord(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRecord(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const zfrIds = row.zfrId || this.ids;
      this.$confirm('是否确认删除融资记录编号为"' + zfrIds + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delRecord(zfrIds);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('sc-service/record/export', {
        ...this.queryParams
      }, `sc-service_record.xlsx`)
    }
  }
};
</script>