Jelajahi Sumber

授信管理页面

peixh 3 tahun lalu
induk
melakukan
a76ae81247

+ 44 - 0
front-vue/src/api/service/creditLine/creditLine.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询企业授信额度列表
+export function listCreditLine(query) {
+  return request({
+    url: '/sc-service_pxh/creditLine/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业授信额度详细
+export function getCreditLine(zfpcrId) {
+  return request({
+    url: '/sc-service_pxh/creditLine/' + zfpcrId,
+    method: 'get'
+  })
+}
+
+// 新增企业授信额度
+export function addCreditLine(data) {
+  return request({
+    url: '/sc-service_pxh/creditLine',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企业授信额度
+export function updateCreditLine(data) {
+  return request({
+    url: '/sc-service_pxh/creditLine',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企业授信额度
+export function delCreditLine(zfpcrId) {
+  return request({
+    url: '/sc-service_pxh/creditLine/' + zfpcrId,
+    method: 'delete'
+  })
+}

+ 257 - 0
front-vue/src/views/service/creditLine/addCreditLine.vue

@@ -0,0 +1,257 @@
+<template>
+  <div class="app-container">
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="融资产品" prop="zfpcrProductId">
+          <el-input v-model="form.zfpcrProductId" placeholder="请输入融资产品" />
+        </el-form-item>
+        <el-form-item label="关联企业(sys_company.scy_id)" prop="zfpcrCompanyId">
+          <el-input v-model="form.zfpcrCompanyId" placeholder="请输入关联企业(sys_company.scy_id)" />
+        </el-form-item>
+        <el-form-item label="授信额度" prop="zfpcrAmount">
+          <el-input v-model="form.zfpcrAmount" placeholder="请输入授信额度" />
+        </el-form-item>
+        <el-form-item label="利率" prop="zfpcrRate">
+          <el-input v-model="form.zfpcrRate" placeholder="请输入利率" />
+        </el-form-item>
+        <el-form-item label="已分割额度" prop="zfpcrDivisionAmount">
+          <el-input v-model="form.zfpcrDivisionAmount" placeholder="请输入已分割额度" />
+        </el-form-item>
+        <el-form-item label="有效期(0:长期, 1:定期)" prop="zfpcrDateType">
+          <el-select v-model="form.zfpcrDateType" placeholder="请选择有效期(0:长期, 1:定期)">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="开始日期" prop="zfpcrStartDate">
+          <el-input v-model="form.zfpcrStartDate" placeholder="请输入开始日期" />
+        </el-form-item>
+        <el-form-item label="到期日期" prop="zfpcrEndDate">
+          <el-input v-model="form.zfpcrEndDate" placeholder="请输入到期日期" />
+        </el-form-item>
+        <el-form-item label="融资网点" prop="zfpcrAddress">
+          <el-input v-model="form.zfpcrAddress" placeholder="请输入融资网点" />
+        </el-form-item>
+        <el-form-item label="是否收取手续费" prop="zfpcrCharge">
+          <el-input v-model="form.zfpcrCharge" placeholder="请输入是否收取手续费" />
+        </el-form-item>
+        <el-form-item label="平台服务费收取费率" prop="zfpcrChargeRate">
+          <el-input v-model="form.zfpcrChargeRate" placeholder="请输入平台服务费收取费率" />
+        </el-form-item>
+        <el-form-item label="核心企业还款账户账号" prop="zfpcrAccount">
+          <el-input v-model="form.zfpcrAccount" placeholder="请输入核心企业还款账户账号" />
+        </el-form-item>
+        <el-form-item label="融资放款方式" prop="zfpcrLoanType">
+          <el-select v-model="form.zfpcrLoanType" placeholder="请选择融资放款方式">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="记账簿托管方式" prop="zfpcrBookkeepingType">
+          <el-select v-model="form.zfpcrBookkeepingType" placeholder="请选择记账簿托管方式">
+            <el-option label="请选择字典生成" value="" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.zfpcrStatus">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </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>
+  </div>
+</template>
+
+<script>
+import { listCreditLine, getCreditLine, delCreditLine, addCreditLine, updateCreditLine} from "@/api/service/creditLine/creditLine";
+export default {
+  name: "addCreditLine",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 企业授信额度表格数据
+      creditLineList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        zfpcrProductId: null,
+        zfpcrCompanyId: null,
+        zfpcrType: null,
+        zfpcrAmount: null,
+        zfpcrRate: null,
+        zfpcrDivisionAmount: null,
+        zfpcrDateType: null,
+        zfpcrStartDate: null,
+        zfpcrEndDate: null,
+        zfpcrAddress: null,
+        zfpcrCharge: null,
+        zfpcrChargeRate: null,
+        zfpcrAccount: null,
+        zfpcrLoanType: null,
+        zfpcrBookkeepingType: null,
+        zfpcrStatus: null,
+        zfpcrProfitSpare1: null,
+        zfpcrProfitSpare2: null,
+        zfpcrProfitSpare3: null,
+        zfpcrProfitSpare4: null,
+        zfpcrProfitSpare5: null,
+        zfpcrProfitSpare6: null,
+        zfpcrProfitSpare7: null,
+        zfpcrProfitSpare8: null,
+        zfpcrProfitSpare9: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        zfpcrProductId: [
+          { required: true, message: "融资产品(zc_finance_product.zfp_id)不能为空", trigger: "blur" }
+        ],
+        zfpcrCompanyId: [
+          { required: true, message: "关联企业(sys_company.scy_id)不能为空", trigger: "blur" }
+        ],
+        zfpcrAmount: [
+          { required: true, message: "授信额度不能为空", trigger: "blur" }
+        ],
+        zfpcrRate: [
+          { required: true, message: "利率不能为空", trigger: "blur" }
+        ],
+        zfpcrCharge: [
+          { required: true, message: "是否收取手续费(0:不收取, 1收取)不能为空", trigger: "blur" }
+        ],
+        zfpcrChargeRate: [
+          { required: true, message: "平台服务费收取费率不能为空", trigger: "blur" }
+        ],
+        zfpcrLoanType: [
+          { required: true, message: "融资放款方式不能为空", trigger: "change" }
+        ],
+        zfpcrBookkeepingType: [
+          { required: true, message: "记账簿托管方式不能为空", trigger: "change" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getDicts("zc_zfpcr_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  activated() {
+    this.getDicts("zc_zfpcr_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  methods: {
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          addCreditLine(this.form).then(response => {
+            this.msgSuccess("新增成功");
+            this.open = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    /* //  将数字金额转换为大写金额 */
+    smallToBig(money) {
+      //  将数字金额转换为大写金额
+      var cnNums = new Array(
+        "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
+      var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
+      var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
+      var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
+      var cnInteger = "整"; //整数金额时后面跟的字符
+      var cnIntLast = "元"; //整数完以后的单位
+      //最大处理的数字
+      var maxNum = 999999999999999.9999;
+      var integerNum; //金额整数部分
+      var decimalNum; //金额小数部分
+      //输出的中文金额字符串
+      var chineseStr = "";
+      var parts; //分离金额后用的数组,预定义
+      if (money == "" || money == null || money == undefined) {
+        return "零元零角零分";
+      }
+      money = parseFloat(money);
+      if (money >= maxNum) {
+        //超出最大处理数字
+        return "超出最大处理数字";
+      }
+      if (money == 0) {
+        chineseStr = cnNums[0] + cnIntLast + cnInteger;
+        return chineseStr;
+      }
+      //四舍五入保留两位小数,转换为字符串
+      money = Math.round(money * 100).toString();
+      integerNum = money.substr(0, money.length - 2);
+      decimalNum = money.substr(money.length - 2);
+      //获取整型部分转换
+      if (parseInt(integerNum, 10) > 0) {
+        var zeroCount = 0;
+        var IntLen = integerNum.length;
+        for (var i = 0; i < IntLen; i++) {
+          var n = integerNum.substr(i, 1);
+          var p = IntLen - i - 1;
+          var q = p / 4;
+          var m = p % 4;
+          if (n == "0") {
+            zeroCount++;
+          } else {
+            if (zeroCount > 0) {
+              chineseStr += cnNums[0];
+            }
+            //归零
+            zeroCount = 0;
+            chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+          }
+          if (m == 0 && zeroCount < 4) {
+            chineseStr += cnIntUnits[q];
+          }
+        }
+        chineseStr += cnIntLast;
+      }
+      //小数部分
+      if (decimalNum != "") {
+        var decLen = decimalNum.length;
+        for (var i = 0; i < decLen; i++) {
+          var n = decimalNum.substr(i, 1);
+          if (n != "0") {
+            chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+          }
+        }
+      }
+      if (chineseStr == "") {
+        chineseStr += cnNums[0] + cnIntLast + cnInteger;
+      } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
+        chineseStr += cnInteger;
+      }
+      return chineseStr;
+    },
+  },
+};
+</script>
+<style>
+.single-select-table thead .el-table-column--selection .cell {
+  display: none;
+}
+
+</style>

+ 702 - 0
front-vue/src/views/service/creditLine/creditLine.vue

@@ -0,0 +1,702 @@
+<template>
+  <div class="app-container">
+      <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>
+                         <column-setting :checkList="checkList" :tableList="tableList" :selfDom="selfDom" :tableId="tableId" style="margin-left:5px"></column-setting>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item prop="scyName" label="企业名称">
+        <el-input
+          v-model="queryParams.scyName"
+          placeholder="请输入企业名称"
+          clearable
+          size="small"
+          maxlength="25"
+          style="width: 190px"
+        />
+      </el-form-item>
+      <el-form-item prop="zfpcrAmount" label="授信额度范围" label-width="90px">
+        <el-input
+          v-model="queryParams.a"
+          placeholder="请输授信额度"
+          clearable
+          size="small"
+          maxlength="25"
+          style="width: 190px"
+        /> -
+        <el-input
+          v-model="queryParams.b"
+          placeholder="请输授信额度"
+          clearable
+          size="small"
+          maxlength="25"
+          style="width: 190px"
+        />
+      </el-form-item>
+      <el-form-item label="授信状态" prop="zfpcrStatus">
+        <el-select v-model="queryParams.zfpcrStatus" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="开始日期" prop="startTime">
+        <el-date-picker  size="small"
+         v-model="queryParams.startTime"
+         style="width: 240px"
+         unlink-panels
+         value-format="yyyy-MM-dd"
+         type="daterange"
+         range-separator="-"
+         start-placeholder="开始日期"
+         end-placeholder="结束日期">
+         </el-date-picker>
+      </el-form-item>
+      <el-form-item label="到期日期" prop="endTime">
+        <el-date-picker  size="small"
+         v-model="queryParams.endTime"
+         style="width: 240px"
+         unlink-panels
+         value-format="yyyy-MM-dd"
+         type="daterange"
+         range-separator="-"
+         start-placeholder="开始日期"
+         end-placeholder="结束日期">
+         </el-date-picker>
+      </el-form-item>
+    </el-form>
+</el-card>
+    <el-row :gutter="10" class="mb8" style="width:96%">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['credit:line:add']"
+        >新增</el-button>
+      </el-col>
+    </el-row>
+
+
+    <el-table v-loading="loading" :data="creditLineList" @selection-change="handleSelectionChange" :row-key="rowKey" stripe  :cell-style="changeCellStyle" border>
+      <!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
+      <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="rzScyName" show-overflow-tooltip v-if="uncheckList.rzScyName" />
+      <el-table-column label="融资产品" align="center" prop="zfpName" v-if="uncheckList.zfpName" show-overflow-tooltip/>
+      <el-table-column label="企业名称" align="center" prop="scyName" v-if="uncheckList.scyName" show-overflow-tooltip/>
+      <el-table-column label="企业代码" align="center" prop="scySocialCode" v-if="uncheckList.scySocialCode" show-overflow-tooltip/>
+      <el-table-column label="授信额度" align="center" prop="zfpcrAmount" show-overflow-tooltip v-if="uncheckList.zfpcrAmount"/>
+      <el-table-column label="利率" align="center" prop="zfpcrRate" v-if="uncheckList.zfpcrRate" width="120" />
+      <el-table-column label="已分割额度"  align="center" prop="zfpcrDivisionAmount" v-if="uncheckList.zfpcrDivisionAmount"/>
+      <el-table-column label="已使用额度"  align="center" prop="zfiAmount" v-if="uncheckList.zfiAmount"/>
+      <el-table-column label="可用额度"  align="center" prop="usableAmount" v-if="uncheckList.usableAmount"/>
+      <el-table-column label="开始日期" align="center" prop="zfpcrStartDate" v-if="uncheckList.zfpcrStartDate" show-overflow-tooltip/>
+      <el-table-column label="结束日期" align="center" prop="zfpcrEndDate" v-if="uncheckList.zfpcrEndDate" show-overflow-tooltip/>
+      <el-table-column label="授信状态" :formatter="statusFormat" align="center" prop="zfpcrStatus" v-if="uncheckList.zfpcrStatus" show-overflow-tooltip/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
+        <template slot-scope="scope">
+          <!-- <el-button
+            type="text"
+            size="mini"
+            icon="el-icon-s-check"
+            @click="handleSubmit(scope.row)"
+            v-hasPermi="['invoice:accountFlow:approval']"
+            v-if="scope.row.pafState != '01' && scope.row.pafState != '02'"
+          >提交审批</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleRows(scope.row)"
+            v-hasPermi="['invoice:accountFlow:query']"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-if="scope.row.pafState != '01' && scope.row.pafState != '02'"
+            v-hasPermi="['invoice:accountFlow:update']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-if="scope.row.pafState != '01' && scope.row.pafState != '02'"
+            v-hasPermi="['invoice:accountFlow: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"
+    />
+  </div>
+</template>
+
+<script>
+import { listCreditLine, getCreditLine, delCreditLine, addCreditLine, updateCreditLine} from "@/api/service/creditLine/creditLine";
+import Cookies from 'js-cookie'
+import { columnQuery, columnfilter } from "@/api/common/columnSetting";
+import ColumnSetting from "../../../components/Table/columnSetting.vue";
+import {getPreMonthDay,getCurrentDateStr} from "@/api/common/getDateUtils";
+export default {
+  name: "CreditLine",
+  components: {
+    ColumnSetting
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      //弹窗是否禁用
+      isShow: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 授信信息表格数据
+      creditLineList: [],
+      //合同列表
+      contractList: [],
+      //授信状态数据字典
+      statusOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        zfpcrProductId: null,
+        zfpcrCompanyId: null,
+        zfpcrType: null,
+        zfpcrAmount: null,
+        zfpcrRate: null,
+        zfpcrDivisionAmount: null,
+        zfpcrDateType: null,
+        zfpcrStartDate: null,
+        zfpcrEndDate: null,
+        zfpcrAddress: null,
+        zfpcrCharge: null,
+        zfpcrChargeRate: null,
+        zfpcrAccount: null,
+        zfpcrLoanType: null,
+        zfpcrBookkeepingType: null,
+        zfpcrStatus: null,
+        zfpcrProfitSpare1: null,
+        zfpcrProfitSpare2: null,
+        zfpcrProfitSpare3: null,
+        zfpcrProfitSpare4: null,
+        zfpcrProfitSpare5: null,
+        zfpcrProfitSpare6: null,
+        zfpcrProfitSpare7: null,
+        zfpcrProfitSpare8: null,
+        zfpcrProfitSpare9: null,
+      },
+      // queryParamsContract: {
+      //   pageNum: 1,
+      //   pageSize: 10,
+      //   cifId: null,
+      //   cifName: null
+      // },
+      options: [],
+      // 表单参数
+      form: {},
+      //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
+      tableList: [
+        {
+          label: "rzScyName",
+          value: "资金方"
+        },
+        {
+          label: "zfpName",
+          value: "融资产品"
+        },
+        {
+          label: 'scyName',
+          value: '企业名称'
+        },
+        {
+          label: 'scySocialCode',
+          value: '企业代码'
+        },
+        {
+          label: "zfpcrAmount",
+          value: "授信额度"
+        },
+        {
+          label: "zfpcrRate",
+          value: "利率"
+        },
+
+        {
+          label: "zfpcrDivisionAmount",
+          value: "已分割额度"
+        },
+        {
+          label: "zfiAmount",
+          value: "已使用额度"
+        },
+        {
+          label: "usableAmount",
+          value: "可用额度"
+        },
+        {
+          label: "zfpcrStartDate",
+          value: "开始日期"
+        },
+        {
+          label: "zfpcrEndDate",
+          value: "结束日期"
+        },
+        {
+          label: "zfpcrStatus",
+          value: "授信状态"
+        }
+      ],
+      checkList: [], //筛选列选中的数据列表--显示隐藏列用
+      uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
+      selfDom: this,
+      tableId: "/sc-service/creditLine/list",
+      // 表单校验
+      rules: {
+        zfpcrProductId: [
+          { required: true, message: "融资产品不能为空", trigger: "blur" }
+        ],
+        zfpcrCompanyId: [
+          { required: true, message: "关联企业不能为空", trigger: "blur" }
+        ],
+        zfpcrAmount: [
+          { required: true, message: "授信额度不能为空", trigger: "blur" }
+        ],
+        zfpcrRate: [
+          { required: true, message: "利率不能为空", trigger: "blur" }
+        ],
+        zfpcrCharge: [
+          { required: true, message: "是否收取手续费不能为空", trigger: "blur" }
+        ],
+        zfpcrChargeRate: [
+          { required: true, message: "平台服务费收取费率不能为空", trigger: "blur" }
+        ],
+        zfpcrLoanType: [
+          { required: true, message: "融资放款方式不能为空", trigger: "change" }
+        ],
+        zfpcrBookkeepingType: [
+          { required: true, message: "记账簿托管方式不能为空", trigger: "change" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.$set(this.queryParams, 'startTime',[this.parseTime(getPreMonthDay(getCurrentDateStr(),3), '{y}-{m}-{d}'), this.parseTime(getCurrentDateStr(), '{y}-{m}-{d}')]);
+    this.$set(this.queryParams, 'endTime',[this.parseTime(getPreMonthDay(getCurrentDateStr(),3), '{y}-{m}-{d}'), this.parseTime(getCurrentDateStr(), '{y}-{m}-{d}')]);
+    this.getList();
+    // this.getContractList();
+    this.getDicts("zc_zfpcr_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  activated() {
+    this.getList();
+    // this.getContractList();
+    this.getDicts("zc_zfpcr_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  mounted() {
+    this.columnQuery();
+  },
+  methods: {
+    /** 查询授信信息列表 */
+    getList() {
+      this.loading = true;
+      listCreditLine(this.queryParams).then(response => {
+        this.creditLineList = response.data.records;
+        this.total = response.data.total;
+       this.loading = false
+      });
+    },
+    handleInput(str) {
+        this.pafCollectionAmtFromat = amtformat(str,2, ".", ",");
+    },
+    stateFormat(row, column, cellValue) {
+      cellValue += "";
+      if (!cellValue.includes(".")) cellValue += ".";
+      return cellValue
+        .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
+          return $1 + ",";
+        })
+        .replace(/\.$/, "");
+    },
+
+    changeCellStyle(row, column, rowIndex, columnIndex) {
+      if (row.column.label === "付款金额") {
+        return "font-weight: 700;"; // 修改的样式
+      } else {
+        return "";
+      }
+    },
+    rowKey(row) {
+      return row.pafId;
+    },
+    //获取当前客户是否之前设置过列展示隐藏
+    columnQuery() {
+      //获取页面路径
+      var psfPagePath = window.location.pathname;
+      //用请求后台的url作为唯一标识
+      var psfTableName = this.tableId;
+      var columnForm = {};
+      columnForm.psfPagePath = psfPagePath;
+      columnForm.psfTableName = psfTableName;
+      columnQuery(columnForm).then(response => {
+        if (response.data && response.data.psfShowData) {
+          this.checkList = response.data.psfShowData;
+        }
+        this.filter();
+      });
+    },
+    //控制隐藏显示的函数
+    filter(checkList) {
+      if (!!checkList) {
+        this.checkList = checkList;
+      }
+      columnfilter(this.selfDom);
+    },
+    
+       // 取消按钮
+       cancel() {
+         this.open = false;
+         this.custId = "";
+         this.ctmId = "";
+         this.customerList = [];
+         this.reset();
+       },
+    cancelDetail(){
+      this.openDetail = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        zfpcrId: null,
+        zfpcrProductId: null,
+        zfpcrCompanyId: null,
+        zfpcrType: null,
+        zfpcrAmount: null,
+        zfpcrRate: null,
+        zfpcrDivisionAmount: null,
+        zfpcrDateType: null,
+        zfpcrStartDate: null,
+        zfpcrEndDate: null,
+        zfpcrAddress: null,
+        zfpcrCharge: null,
+        zfpcrChargeRate: null,
+        zfpcrAccount: null,
+        zfpcrLoanType: null,
+        zfpcrBookkeepingType: null,
+        zfpcrStatus: "0",
+        zfpcrProfitSpare1: null,
+        zfpcrProfitSpare2: null,
+        zfpcrProfitSpare3: null,
+        zfpcrProfitSpare4: null,
+        zfpcrProfitSpare5: null,
+        zfpcrProfitSpare6: null,
+        zfpcrProfitSpare7: null,
+        zfpcrProfitSpare8: null,
+        zfpcrProfitSpare9: 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();
+      this.getProjectList();
+      this.getContractList();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.pafId);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 字典翻译 */
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.zfpcrStatus);
+    },
+    //合同信息
+    // getContractList(query) {
+    //   this.queryParamsContract.cifName = query;
+    //   listContract(this.queryParamsContract).then(response => {
+    //     this.contractList = response.rows;
+    //   });
+    //   //合同
+    //   this.$set(this.form, "pafContractId", "");
+    //   //客户名称
+    //   this.$set(this.form, "cciName", "");
+    // },
+    /**提交按钮操作 */
+    handleSubmit(row) {
+      console.log(row);
+      /* const wliId = row.wliId || this.ids;
+      const wliCompanyId = row.wliCompanyId;
+      const wliLeaveDay = row.wliLeaveDay; */
+      this.$confirm("是否确认提交付款审批?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(function() {
+          return submitApproval(row);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("提交审批成功");
+        })
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消提交审批"
+          });
+        });
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      Cookies.set("/creditLine/addCreditLine/", this.$route.fullPath)
+      this.$router.push("/creditLine/addCreditLine/");
+    },
+    /** 修改按钮操作 */
+    // handleUpdate(row) {
+    //   const pafId = row.pafId || this.ids;
+    //   Cookies.set("/paymentManage/editPaymentManage/" + pafId, this.$route.fullPath)
+    //   this.$router.push("/paymentManage/editPaymentManage/" + pafId);
+    // },
+    // /** 详情按钮操作 */
+    // handleRows(row) {
+    //   const pafId = row.pafId || this.ids;
+    //   Cookies.set("/paymentManage/detailPaymentManage/" + pafId, this.$route.fullPath)
+    //   this.$router.push("/paymentManage/detailPaymentManage/" + pafId);
+    // },
+    /** 提交按钮 */
+    submitForm(state) {
+      this.$refs["form"].validate(valid => {
+        if (state) {
+          this.form.pafState = state;
+        }
+        console.log(this.form,"提交form")
+        debugger
+        if (valid) {
+          if (this.form.pafId != null) {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)"
+            });
+            updateFlow(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.reset();
+              this.getList();
+            });
+            loading.close();
+          } else {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)"
+            });
+            addFlow(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.reset();
+              this.getList();
+            });
+            loading.close();
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const pafIds = row.pafId || this.ids;
+      this.$confirm("是否确认删除此数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(function() {
+          return delFlow(pafIds);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消删除"
+          });
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport(row) {
+      // const pafIds = row.pafId || this.ids;
+      // if (pafIds.length > 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: "Loading",
+          spinner: "el-icon-loading",
+          background: "rgba(0, 0, 0, 0.7)"
+        });
+        this.download(
+          "invoice/accountFlow/export",
+          {
+            ...this.queryParams
+          },
+          `付款.xls`
+        );
+        setTimeout(() => {
+          loading.close();
+          this.create = false;
+          this.end = true;
+          this.active = 1;
+        }, 2000);
+      // } else {
+      //   this.$message({
+      //     message: "请选择付款项!",
+      //     type: "warning"
+      //   });
+      //   return;
+      // }
+      this.getList();
+    },
+    /* //  将数字金额转换为大写金额 */
+    smallToBig(money) {
+      //  将数字金额转换为大写金额
+      var cnNums = new Array(
+        "零",
+        "壹",
+        "贰",
+        "叁",
+        "肆",
+        "伍",
+        "陆",
+        "柒",
+        "捌",
+        "玖"
+      ); //汉字的数字
+      var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
+      var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
+      var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
+      var cnInteger = "整"; //整数金额时后面跟的字符
+      var cnIntLast = "元"; //整数完以后的单位
+      //最大处理的数字
+      var maxNum = 999999999999999.9999;
+      var integerNum; //金额整数部分
+      var decimalNum; //金额小数部分
+      //输出的中文金额字符串
+      var chineseStr = "";
+      var parts; //分离金额后用的数组,预定义
+      if (money == "" || money == null || money == undefined) {
+        return "零元零角零分";
+      }
+
+      money = parseFloat(money);
+      if (money >= maxNum) {
+        //超出最大处理数字
+        return "超出最大处理数字";
+      }
+      if (money == 0) {
+        chineseStr = cnNums[0] + cnIntLast + cnInteger;
+        return chineseStr;
+      }
+
+      //四舍五入保留两位小数,转换为字符串
+      money = Math.round(money * 100).toString();
+      integerNum = money.substr(0, money.length - 2);
+      decimalNum = money.substr(money.length - 2);
+
+      //获取整型部分转换
+      if (parseInt(integerNum, 10) > 0) {
+        var zeroCount = 0;
+        var IntLen = integerNum.length;
+        for (var i = 0; i < IntLen; i++) {
+          var n = integerNum.substr(i, 1);
+          var p = IntLen - i - 1;
+          var q = p / 4;
+          var m = p % 4;
+          if (n == "0") {
+            zeroCount++;
+          } else {
+            if (zeroCount > 0) {
+              chineseStr += cnNums[0];
+            }
+            //归零
+            zeroCount = 0;
+            chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+          }
+          if (m == 0 && zeroCount < 4) {
+            chineseStr += cnIntUnits[q];
+          }
+        }
+        chineseStr += cnIntLast;
+      }
+      //小数部分
+      if (decimalNum != "") {
+        var decLen = decimalNum.length;
+        for (var i = 0; i < decLen; i++) {
+          var n = decimalNum.substr(i, 1);
+          if (n != "0") {
+            chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+          }
+        }
+      }
+      if (chineseStr == "") {
+        chineseStr += cnNums[0] + cnIntLast + cnInteger;
+      } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
+        chineseStr += cnInteger;
+      }
+      return chineseStr;
+    }
+  }
+};
+</script>
+