Browse Source

Merge branch 'master' of http://git.minpay.cc/SupplyChain/front

peixh 3 years ago
parent
commit
66a67ccd9b

+ 51 - 0
front-vue/src/api/service/contract/contract.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 查询合同信息列表
+export function listContract(query) {
+  return request({
+    url: '/sc-service/contract/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询合同信息详细
+export function getContract(zfcId) {
+  return request({
+    url: '/sc-service/contract/' + zfcId,
+    method: 'get'
+  })
+}
+
+// 新增合同信息
+export function addContract(data) {
+  return request({
+    url: '/sc-service/contract',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改合同信息
+export function updateContract(data) {
+  return request({
+    url: '/sc-service/contract',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除合同信息
+export function delContract(zfcId) {
+  return request({
+    url: '/sc-service/contract/' + zfcId,
+    method: 'delete'
+  })
+}
+// 启用/停用合同
+export function changeState(zfcId) {
+  return request({
+    url: '/sc-service/contract/change/'+zfcId,
+    method: 'put',
+  })
+}

+ 25 - 0
front-vue/src/router/index.js

@@ -216,6 +216,31 @@ export const constantRoutes = [
       },
     ]
   },
+  {
+    path: '/contract',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'addContract/',
+        component: (resolve) => require(['@/views/service/contract/addContract'], resolve),
+        name: 'addContract',
+        meta: { title: '新增合同',noCache: true }
+      },
+      {
+        path: 'editContract/:zfcId',
+        component: (resolve) => require(['@/views/service/contract/editContract'], resolve),
+        name: 'editContract',
+        meta: { title: '修改合同',noCache: true }
+      },
+      {
+        path: 'detailContract/:zfcId',
+        component: (resolve) => require(['@/views/service/contract/detailContract'], resolve),
+        name: 'detailContract',
+        meta: { title: '合同详情',noCache: true }
+      },
+    ]
+  },
 ]
 
 export default new Router({

+ 634 - 0
front-vue/src/views/service/contract/addContract.vue

@@ -0,0 +1,634 @@
+<template>
+  <div class="app-container">
+    <el-form :inline="true" ref="form" :model="form" :rules="rules" label-width="auto" style="margin-top: 20px;"  >
+      <el-divider content-position="left">基本信息</el-divider>
+        <!-- <el-form-item label="融资产品编号" prop="zfpNumber">
+          <el-input v-model="form.zfpNumber" placeholder="请输入融资产品编号" />
+        </el-form-item> -->
+        <el-form-item label="融资产品名称:" prop="zfpName" style="margin-left: 5%">
+          <el-input v-model="form.zfpName" placeholder="请输入融资产品名称" />
+        </el-form-item>
+        <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
+           <el-select
+           style="width: 95%;"
+              v-model="form.zfpManagementId"
+              placeholder="请选择资金方"
+              clearable
+              size="small">
+              <el-option
+                v-for="(item,index) in companyList"
+                :key="index"
+                :label="item.scyName"
+                :value="item.scyId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否可拆转融:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpSplit" label="0">否</el-radio>
+          <el-radio v-model="form.zfpSplit" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="产品类型:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpType" label="0">正向</el-radio>
+          <el-radio v-model="form.zfpType" label="1">反向</el-radio>
+        </el-form-item>
+         <el-divider content-position="left">平台参数</el-divider>
+
+        <el-form-item label="最小融资金额:" prop="zfpMinimumAmount" style="margin-left: 5%">
+          <el-input v-model="form.zfpMinimumAmount" placeholder="请输入最小融资金额" />
+        </el-form-item>
+         <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
+          <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change"/>
+        </el-form-item>
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
+          <el-radio v-model="form.zfpCharge" label="0">否</el-radio>
+          <el-radio v-model="form.zfpCharge" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否有追索权:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpRecourse" label="0">否</el-radio>
+          <el-radio v-model="form.zfpRecourse" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
+          <el-select
+            v-model="form.zfpVoucherType"
+            placeholder="请选择电子凭证类型"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in voucherTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-divider content-position="left">资方参数</el-divider>
+
+        <el-form-item label="是否需核心企业开户:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11.1%">
+          <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpBookkeeping"
+            placeholder="请选择记账簿托管方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in bookkeepingOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否支持部分融资:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpPart" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPart" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11.1%">
+          <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
+        </el-form-item>
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6.2%">
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpExpire"
+            placeholder="请选择融资到期方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in expireOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方是否支持返佣:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpProfit" label= "0">否</el-radio>
+          <el-radio v-model="form.zfpProfit" label= "1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 5%" v-if="form.zfpProfit== '1'">
+          <el-select
+            v-model="form.zfpProfitType"
+            placeholder="请选择资方返佣方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in profitTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方返佣费率" prop="zfpProfitRate" style="margin-left: 5%" v-if="form.zfpProfit== '1'">
+          <el-input v-model="form.zfpProfitRate" placeholder="请输入资方返佣费率" />
+        </el-form-item>
+        <el-form-item label="是否需平台审批:" style="margin-left: 11.1%">
+          <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 12.2%" >
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpAuthType"
+            placeholder="请选择签署意愿类型"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in authTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+
+        <el-divider content-position="left">关联合同</el-divider>
+        <el-form-item prop="zfcId" style="margin-left: 100px" >
+        <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
+        <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
+        <el-table :data="contractList" style="width: 1100px">
+          <el-table-column label="合同模板编号"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip />
+          <el-table-column label="合同模板名称"  align="center"  prop="zfcName"   />
+          <el-table-column label="签署方"  align="center"  prop="pvfDate"    />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.$index, contractList)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form-item>
+      </el-form>
+      <!-- 合同信息 -->
+    <el-dialog :title="invoiceTitle" :visible.sync="open" width="1120px" append-to-body>
+      <el-form :model="queryParamsInvoice"  ref="formQuery"  :inline="true"  label-width="68px"  style="margin-bottom: -21px">
+        <el-form-item label="发票标题" prop="pvfInvoiceTitle">
+          <el-input
+            v-model="queryParamsInvoice.pvfInvoiceTitle"
+            placeholder="请输入发票标题"
+            clearable
+            size="small"
+            maxlength="11"
+            @keyup.enter.native="handleQuerys"/>
+        </el-form-item>
+        <el-form-item label="开票日期" prop="dateTime">
+          <el-date-picker
+            size="small"
+            v-model="queryParamsInvoice.dateTime"
+            unlink-panels
+            style="width: 240px"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="cyan"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuerys"
+            >搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
+            >重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table :data="InvoiceList"
+        ref="tableInvoice"
+        class="single-select-table"
+        @selection-change="handleSelectionChange" 
+        :row-key="rowkey">
+        <el-table-column
+          type="selection"
+          :reserve-selection="true"
+          width="50"
+          align="center"/>
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template slot-scope="scope">
+            <span>{{ (queryParamsInvoice.pageNum - 1) * queryParamsInvoice.pageSize + scope.$index + 1}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发票标题"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip width="100" />
+        <el-table-column label="发票金额"  align="center"  prop="pvfTaxPrice"  width="125" />
+        <el-table-column label="发票张数"  align="center"  prop="pvfInvoiceNum" show-overflow-tooltip width="100" />
+        <el-table-column label="开票日期"  align="center"  prop="pvfDate"  width="95"  />
+        <el-table-column label="客户名称"  align="center"  prop="cciName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="合同名称"  align="center"  prop="cifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="项目名称"  align="center"  prop="pifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="发票类型"  align="center"  :formatter="pvfCategoryFormat"  prop="pvfCategory"  width="120" />
+        <el-table-column label="交付日期"  align="center"  prop="pvfDeliverTime"  width="95" />
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParamsInvoice.pageNum"
+        :limit.sync="queryParamsInvoice.pageSize"
+        @pagination="getInvoiceList" />
+      <!-- <el-button type="primary" @click="submitData()">关闭</el-button> -->
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelTicket">取消</el-button>
+        <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
+        <!-- <el-button @click="cancelSelection">取 消</el-button>
+        <el-button type="primary" @click="changeInvoice">确 定</el-button> -->
+      </span>
+    </el-dialog>
+    <!-- 保存 -->
+    <div class="footer" style="margin-top: 260px; float: right">
+      <el-button type="info" @click="cancel">取消</el-button>
+      <el-button type="success" @click="submitForm"
+        >提交</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { addFinanceProduct } from "@/api/service/financeProduct/financeProduct";
+import { listCompany } from "@/api/common/company";
+export default {
+  name: "addContract",
+  components: {},
+  data() {
+    return {
+      //发票表格数据
+      contractList: [],
+      //选中发票数据
+      chooseTicket:[],
+      // 日期范围
+      dateRange: [],
+      pafCustomerId: "",
+      activeName: "1",
+      // 选中数组
+      ids: [],
+      // 弹出层标题
+      title: "",
+      invoiceTitle:"",
+      openInvoice : false,
+      // 总条数
+      total: 0,
+      totalCustomer: 0,
+      totalContract: 0,
+      totalProject: 0,
+      // 是否显示弹出层
+      open: false,
+      openCustomer: false,
+      openContract: false,
+      openProject: false,
+      customerName: "",
+      customerId: '',
+      fpId: "",
+      ctnId : '',
+      pafCollectionAmtFromat: "",
+      // 资方列表
+      companyList: [],
+      //余额
+      BalanceList: [],
+      multipleSelection: [],
+      //账户列表
+      AccList: [],
+      //项目列表
+      projectList: [],
+      pjtent: [],
+      proId: '',
+      pjtId: '',
+      //科目列表
+      subjectList:[],
+      current: [],
+      custent: [],
+      //合同列表
+      contractList: [],
+      content: [],
+      //发票列表
+      InvoiceList: [],
+      //数据字典
+      voucherTypeOptions: [],
+      bookkeepingOptions: [],
+      expireOptions: [],
+      profitTypeOptions: [],
+      authTypeOptions:[],
+      // 表单参数
+      form: {},
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pifName: null,
+        pifId: null,
+        pifContractId: null,
+      },
+      queryParamsInvoice: {
+        pageNum: 1,
+        pageSize: 10,
+        dateTime: [],
+        pvfProjectId: null,
+        pvfContractId: null,
+        pidCode: null,
+        pvfTYPE: null,
+        pvfInvoiceTitle : null
+      },
+      options: [],
+      value: [],
+      loading: false,
+      // 表单校验
+      rules: {
+        zfpName: [
+          {
+            required: true,
+            message: "产品名称不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpManagementId: [
+          {
+            required: true,
+            message: "资金方不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpMinimumAmount: [
+          {
+            required: true,
+            pattern: /^[0-9][0-9]{0,9}$|^[1-9][0-9]{0,9}[.]\d{1,2}$/,
+            message: "请输入正确的付款金额",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpShortestPeriod: [
+          {
+            required: true,
+            message: "最短融资账期不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpVoucherType: [
+          {
+            required: true,
+            message: "电子凭证类型不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    this.reset();
+    this.getCompanyList();
+    //this.getList();
+    this.getDicts("zc_zfp_voucher_type").then((response) => {
+      this.voucherTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_bookkeeping").then((response) => {
+      this.bookkeepingOptions = response.data;
+    });
+    this.getDicts("zc_zfp_expire").then((response) => {
+      this.expireOptions = response.data;
+    });
+    this.getDicts("zc_zfp_profit_type").then((response) => {
+      this.profitTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_auth_type").then((response) => {
+      this.authTypeOptions = response.data;
+    });
+  },
+  activated() {
+    this.reset();
+    //this.getList();
+  },
+  methods: {
+    /** 查询资方 */
+    getCompanyList(){
+      const type = "03";
+      listCompany(type).then(response =>{
+        this.companyList = response.data;
+      })
+    },
+    getList(){
+      const cifId = this.$route.params && this.$route.params.cifId;
+      //合同信息
+      getOwnContract(cifId).then((response) => {
+        debugger
+            this.$set(this.form, "pafContractId", cifId);
+            this.$set(this.form, "cifName", response.data.data.cifName);
+        if(response){
+            //客户信息
+            this.$set(this.form, "pafCustomerId", response.data.data.cifCustomerId);
+            this.$set(this.form, "cciName", response.data.data.cciName);
+            listContractNode(cifId).then((res) => {
+              this.contractNodeList = res.data;
+            });
+            this.queryParamsProject.pifCustomerName = response.data.data.cciName;
+            this.queryParamsAcc.ccaCustomerId = response.data.data.cifCustomerId;
+            this.queryParamsAcc.cccType = '00';
+            listAcc(this.queryParamsAcc).then((r) => {
+                this.AccList = r.data.records;
+                if(r.data.records[0].ccaId){
+                this.$set(this.form, "pafAccountId", r.data.records[0].ccaId);
+                }else{
+                  this.queryParamsAcc.ccaCustomerId = '';
+                  this.getAccList();
+                }
+            });
+        }
+      });
+    },
+    change(val){
+      if(val<=14){
+        this.$set(this.form, "zfpShortestPeriod", "14");
+      }
+      return ;
+    },
+    /* -------------------------合同相关---------------------------- */
+        //合同列表
+    getInvoiceList() {
+      listInvoice(this.queryParamsInvoice).then((response) => {
+        this.InvoiceList = response.data.records;
+        this.selectChecked();
+        this.total = response.data.total;
+      });
+    },
+    //打开合同选择列表
+    openTicket() {
+      this.getInvoiceList();
+      this.open = true;
+      this.title = "合同信息";
+    },
+    selectChecked() {
+      this.contractList.forEach((item) => {
+        this.InvoiceList.forEach((row) => {
+          if (row.pvfId == item.pvId) {
+            this.$nextTick(() => {
+              this.$refs.tableInvoice &&
+                this.$refs.tableInvoice.toggleRowSelection(row, true);
+            });
+          }
+        });
+      });
+    },
+    /* 多选框跨页 */
+    rowkey(row) {
+      return row.pvfId;
+    },
+    // 多选框选中数据
+    handleSelectionChange(val) {
+        this.chooseTicket = val
+    },
+    // 确认选择
+    closeTicket() {
+        if(this.chooseTicket){
+          if(this.chooseTicket[0].pvfTYPE == '01'){
+          this.contractList = this.chooseTicket
+          this.$set(this.form, "pvfDate", this.parseTime(new Date(this.contractList[0].pvfDate)));
+          this.$set(this.form, "pvfInvoiceTitle", this.contractList[0].pvfInvoiceTitle);
+          this.$set(this.form, "pvfTaxPrice", this.contractList[0].pvfTaxPrice);
+          this.$set(this.form, "pvfInvoiceNum", this.contractList[0].pvfInvoiceNum);
+          this.open = false
+        }else{
+          this.$message({
+            message: '所选发票信息异常',
+            type: 'warning'
+          });
+        }
+        }
+    },
+    //取消选择发票按钮
+    cancelTicket(){
+      if(this.contractList.length > 0){
+        this.open = false;
+      }else{
+        this.contractList = [];
+        this.$refs.tableInvoice.clearSelection()
+        this.open = false;
+      }
+    },
+    /** 清空选择发票信息 */
+    deleteTicekt() {
+      this.contractList = [];
+      this.$refs.tableInvoice.clearSelection()
+    },
+    /* 删除按钮 */
+    handleDelete(index, rows) {
+      console.log(rows,"AAAAAAAAAAA")
+      rows.splice(index, 1);
+      this.$refs.tableInvoice.clearSelection()
+      this.selectChecked();
+    },
+    onSelectAll() {
+      this.$refs.tableInvoice.clearSelection();
+    },
+    handleQuerys() {
+      this.queryParamsInvoice.pageNum = 1;
+      this.getInvoiceList();
+    },
+    resetQuerys() {
+      this.resetForm("formQuery");
+      this.handleQuerys();
+    },
+    handleInput(str) {
+      this.pafCollectionAmtFromat = amtformat(str, 2, ".", ",");
+    },
+    //发票类型
+    pvfCategoryFormat(row, column) {
+      return this.selectDictLabel(this.pvfCategoryOptions, row.pvfCategory);
+    },
+    /* ---------------------------------------------------------------------- */
+    // 多选框选中数据
+    handleCurrentChange(val) {
+      // this.currentRow = val;
+      // this.open = false;
+    },
+   
+    /* 清空 */
+    clearBoth() {
+      this.proId =  '';
+      this.pjtId = '';
+      // this.getContractList();
+      this.getProjectList();
+      this.getSubjectList();
+      this.queryParamsAcc.ccaCustomerId = null;
+      this.getAccList();
+    },
+    reset(){
+      this.form = {
+        zfpId: null,
+        zfpNumber: null,
+        zfpName: null,
+        zfpManagementId: null,
+        zfpSplit: "0",
+        zfpType:"1",
+        zfpAuthType:"00",
+        zfpTransfer: "0",
+        zfpRecourse: "0",
+        zfpVoucherType: null,
+        zfpCoreAccount: "0",
+        zfpSupplierAccount: "0",
+        zfpCharge: "0",
+        zfpStatus: "0",
+        zfpMinimumAmount: null,
+        zfpShortestPeriod: null,
+        zfpBookkeeping: null,
+        zfpPart: "0",
+        zfpExpire: null,
+        zfpRate: null,
+        zfpProfit: "0",
+        zfpProfitType: null,
+        zfpProfitRate: null,
+        zfpPlatform: "0",
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+       this.resetForm("form");
+    },
+/* ---------------------------------------------------------------------- */
+    // 取消按钮
+    cancel() {
+      this.reset();
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+      this.open = false;
+    },
+    /** 保存按钮 */
+    submitForm() {
+      
+      this.$refs["form"].validate((valid) => {
+        this.form.contractList = this.contractList;
+        console.log(this.form)
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "Loading",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          addFinanceProduct(this.form)
+            .then((response) => {
+              loading.close();
+              this.msgSuccess("新增成功");
+              this.$store.dispatch("tagsView/delView", this.$route);
+              this.$router.go(-1);
+            })
+            .catch((response) => {
+              loading.close();
+            });
+        }
+      });
+    },
+    // submitData() {
+    //   this.open = false;
+    // },
+    /* //  将数字金额转换为大写金额 */
+  },
+};
+</script>
+<style>
+.single-select-table thead .el-table-column--selection .cell {
+  display: none;
+}
+
+</style>

+ 376 - 0
front-vue/src/views/service/contract/contract.vue

@@ -0,0 +1,376 @@
+<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></column-setting>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="资金方" prop="scyName" >
+        <el-input
+          v-model="queryParams.scyName"
+          placeholder="请输入资金方"
+          clearable
+          size="small"
+          maxlength="30"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="合同模板名称" prop="zfcName">
+          <el-input
+          v-model="queryParams.zfcName"
+          placeholder="请输入模板名称"
+          clearable
+          size="small"
+          maxlength="20"
+        />
+      </el-form-item>
+      <el-form-item label="合同模板状态" prop="zfcStatus">
+          <el-select
+            v-model="queryParams.zfcStatus"
+            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>
+      </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="['service:contract:add']"
+        >新增</el-button>
+      </el-col>
+	
+    </el-row>
+
+    <el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange" border>
+      <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="scyName" :show-overflow-tooltip="true" v-if="uncheckList.scyName"/> 
+      <el-table-column label="合同模板名称" align="center" prop="zfcName" :show-overflow-tooltip="true" v-if="uncheckList.zfcName"/>
+      <el-table-column label="合同模板状态" align="center" prop="zfcStatus" :formatter="statusFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfcStatus"/>
+      <el-table-column label="签署节点" align="center" prop="zfcNode"  :formatter="nodeFormat" :show-overflow-tooltip="true" v-if="uncheckList.zfcNode"/>
+      <el-table-column label="签署方" align="center" prop="zfcSubject"  :show-overflow-tooltip="true" v-if="uncheckList.zfcSubject"/>
+      <el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true" v-if="uncheckList.createBy"/>
+      <el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" v-if="uncheckList.createTime"/>
+      <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="['service:contract:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleChange(scope.row)"
+            v-if="scope.row.zfpStatus == '01'"
+            v-hasPermi="['service:contract:change']"
+          >停用</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleChange(scope.row)"
+            v-if="scope.row.zfpStatus == '00'"
+            v-hasPermi="['service:contract:change']"
+          >启用</el-button>
+           <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleInfo(scope.row)"
+            v-hasPermi="['service:contract:query']"
+          >详情</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 { listContract } from "@/api/service/contract/contract";
+import ColumnSetting from "../../../components/Table/columnSetting.vue";
+import { columnQuery, columnfilter } from "@/api/common/columnSetting";
+
+export default {
+  name: "contract",
+  components: {
+    ColumnSetting 
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      contractList:[],
+      statusOptions:[],
+      // 总条数
+      total: 0,
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        zfcName: null,
+        scyName: null,
+        zfcStatus: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        //  pptName:[
+        //   { required: true, message: "项目类型不能为空", trigger: "blur" },
+        // ]
+      },
+      tableList: [
+        {
+          label: "scyName",
+          value: "资金渠道"
+        },
+        {
+          label: "zfcName",
+          value: "合同模板名称"
+        },
+        {
+          label: "zfcStatus",
+          value: "合同模板状态"
+        },
+        {
+          label: "zfcNode",
+          value: "签署节点"
+        },
+        {
+          label: "zfcSubject",
+          value: "签署方"
+        },
+        {
+          label: "createBy",
+          value: "创建人"
+        },
+        {
+          label: "createTime",
+          value: "创建时间"
+        },
+      ],
+      checkList: [], //筛选列选中的数据列表--显示隐藏列用
+      uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
+      selfDom: this,
+      tableId: "/service/contract/list",
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("zc_zfc_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("zc_zfc_node").then((response) => {
+      this.nodeOptions = response.data;
+    });
+  },
+  activated(){
+    this.getList();
+  },
+  mounted() {
+    this.columnQuery();
+  },
+  methods: {
+    /** 查询融资产品列表 */
+    getList() {
+      this.loading = true;
+      listContract(this.queryParams).then(response => {
+        this.contractList = response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+       
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+     /*  this.ids = selection.map(item => item.ptcId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length */
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.$router.push("/contract/addContract/");
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      const zfcId = row.zfcId
+      this.$router.push("/contract/addContract/"+ zfcId);
+    },/** 修改按钮操作 */
+    handleInfo(row) {
+      const zfcId = row.zfcId
+      this.$router.push("/contract/addContract/"+ zfcId);
+    },
+    /** 启用按钮操作 */
+     handleChange(row) {
+       const zfcId = row.zfcId;
+       changeState(zfcId).then((response)=>{
+         this.getList();
+       })
+     },
+    //合同模板状态字典反显
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.zfcStatus);
+    },
+    //签署主体字典反显
+    nodeFormat(row, column) {
+      return this.selectDictLabel(this.nodeOptions, row.zfcNode);
+    },
+    //获取当前客户是否之前设置过列展示隐藏
+    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);
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.pptId != null) {
+            const loading = this.$loading({
+                lock: true,
+                text: "Loading",
+                spinner: "el-icon-loading",
+                background: "rgba(0, 0, 0, 0.7)",
+            })
+            updateProjectType(this.form).then(response => {
+              loading.close();
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            }).catch((response)=>{
+              loading.close();
+            });
+          } else {
+            const loading = this.$loading({
+                lock: true,
+                text: "Loading",
+                spinner: "el-icon-loading",
+                background: "rgba(0, 0, 0, 0.7)",
+            })
+            addProjectType(this.form).then(response => {
+              loading.close();
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            }).catch((response)=>{
+              loading.close();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const pptId = row.pptId || this.ids;
+      const pptName = row.pptName;
+      this.$confirm('是否确认删除项目类型为"'+ pptName +'"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delProjectType(pptId);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+           .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消删除",
+           
+          });
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      /* this.download('base/taxCode/export', {
+        ...this.queryParams
+      }, `base_taxCode.xlsx`) */
+    }
+  }
+};
+</script>

+ 662 - 0
front-vue/src/views/service/contract/detailContract.vue

@@ -0,0 +1,662 @@
+<template>
+  <div class="app-container">
+    <el-form :inline="true" ref="form" :model="form" :rules="rules" label-width="auto" style="margin-top: 20px;" disabled >
+      <el-form-item label="融资产品编号:" prop="zfpNumber" style="margin-left: 5%">
+          <el-input v-model="form.zfpNumber" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item label="创建人:" prop="userName" style="margin-left: 5%">
+          <el-input v-model="userName" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5.7%">
+          <el-input v-model="form.createTime" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+      <el-divider content-position="left">基本信息</el-divider>
+        <!-- <el-form-item label="融资产品编号" prop="zfpNumber">
+          <el-input v-model="form.zfpNumber" placeholder="请输入融资产品编号" />
+        </el-form-item> -->
+        <el-form-item label="融资产品名称:" prop="zfpName" style="margin-left: 5%">
+          <el-input v-model="form.zfpName" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item  label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
+           <el-select
+           style= "width: 95%;"
+              v-model="form.zfpManagementId"
+              placeholder="请选择资金方"
+              clearable
+              :disabled="disabled"
+              size="small">
+              <el-option
+                v-for="(item,index) in companyList"
+                :key="index"
+                :label="item.scyName"
+                :value="item.scyId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否可拆转融:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpSplit" label="0" :disabled="disabled">否</el-radio>
+          <el-radio v-model="form.zfpSplit" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="产品类型:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpType" label="0" :disabled="disabled">正向</el-radio>
+          <el-radio v-model="form.zfpType" label="1" :disabled="disabled">反向</el-radio>
+        </el-form-item>
+         <el-divider content-position="left">平台参数</el-divider>
+
+        <el-form-item label="最小融资金额:" prop="zfpMinimumAmount" style="margin-left: 5%">
+          <el-input v-model="form.zfpMinimumAmount" placeholder="请输入最小融资金额" :disabled="disabled" />
+        </el-form-item>
+         <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
+          <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change" :disabled="disabled"/>
+        </el-form-item>
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
+          <el-radio v-model="form.zfpCharge" label="0" :disabled="disabled">否</el-radio>
+          <el-radio v-model="form.zfpCharge" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否有追索权:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpRecourse" label="0" :disabled="disabled">否</el-radio>
+          <el-radio style="margin-left: 50%;" v-model="form.zfpRecourse" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
+          <el-select
+          style= "width: 95%;"
+            v-model="form.zfpVoucherType"
+            placeholder="请选择电子凭证类型"
+            clearable
+            :disabled="disabled"
+            size="small">
+            <el-option
+              v-for="dict in voucherTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-divider content-position="left">资方参数</el-divider>
+
+        <el-form-item label="是否需核心企业开户:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11%">
+          <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
+          <el-select
+          style= "width: 95%;"
+            v-model="form.zfpBookkeeping"
+            placeholder="请选择记账簿托管方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in bookkeepingOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否支持部分融资:" style="float: left; margin-left: 5%">
+          <el-radio v-model="form.zfpPart" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPart" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11%">
+          <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
+        </el-form-item>
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6%">
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpExpire"
+            placeholder="请选择融资到期方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in expireOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方是否支持返佣:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpProfit" label= "0" >否</el-radio>
+          <el-radio v-model="form.zfpProfit" label= "1" >是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 11.1%" v-if="form.zfpProfit== '1' ">
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpProfitType"
+            placeholder="请选择资方返佣方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in profitTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方返佣费率" prop="zfpProfitRate" style="margin-left: 5%" v-if="form.zfpProfit== '1' ">
+          <el-input v-model="form.zfpProfitRate" placeholder="请输入资方返佣费率" />
+        </el-form-item>
+        <el-form-item label="是否需平台审批:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 11.1%" >
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpAuthType"
+            placeholder="请选择签署意愿类型"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in authTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-divider content-position="left">关联合同</el-divider>
+        <el-form-item prop="zfcId" style="margin-left: 100px" >
+        <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
+        <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
+        <el-table :data="contractList" style="width: 1100px">
+          <el-table-column label="合同模板编号"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip />
+          <el-table-column label="合同模板名称"  align="center"  prop="zfcName"   />
+          <el-table-column label="签署方"  align="center"  prop="pvfDate"    />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.$index, contractList)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form-item>
+      </el-form>
+      <!-- 合同信息 -->
+    <el-dialog :title="invoiceTitle" :visible.sync="open" width="1120px" append-to-body>
+      <el-form :model="queryParamsInvoice"  ref="formQuery"  :inline="true"  label-width="68px"  style="margin-bottom: -21px">
+        <el-form-item label="发票标题" prop="pvfInvoiceTitle">
+          <el-input
+            v-model="queryParamsInvoice.pvfInvoiceTitle"
+            placeholder="请输入发票标题"
+            clearable
+            size="small"
+            maxlength="11"
+            @keyup.enter.native="handleQuerys"/>
+        </el-form-item>
+        <el-form-item label="开票日期" prop="dateTime">
+          <el-date-picker
+            size="small"
+            v-model="queryParamsInvoice.dateTime"
+            unlink-panels
+            style="width: 240px"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="cyan"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuerys"
+            >搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
+            >重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table :data="InvoiceList"
+        ref="tableInvoice"
+        class="single-select-table"
+        @selection-change="handleSelectionChange" 
+        :row-key="rowkey">
+        <el-table-column
+          type="selection"
+          :reserve-selection="true"
+          width="50"
+          align="center"/>
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template slot-scope="scope">
+            <span>{{ (queryParamsInvoice.pageNum - 1) * queryParamsInvoice.pageSize + scope.$index + 1}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发票标题"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip width="100" />
+        <el-table-column label="发票金额"  align="center"  prop="pvfTaxPrice"  width="125" />
+        <el-table-column label="发票张数"  align="center"  prop="pvfInvoiceNum" show-overflow-tooltip width="100" />
+        <el-table-column label="开票日期"  align="center"  prop="pvfDate"  width="95"  />
+        <el-table-column label="客户名称"  align="center"  prop="cciName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="合同名称"  align="center"  prop="cifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="项目名称"  align="center"  prop="pifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="发票类型"  align="center"  :formatter="pvfCategoryFormat"  prop="pvfCategory"  width="120" />
+        <el-table-column label="交付日期"  align="center"  prop="pvfDeliverTime"  width="95" />
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParamsInvoice.pageNum"
+        :limit.sync="queryParamsInvoice.pageSize"
+        @pagination="getInvoiceList" />
+      <!-- <el-button type="primary" @click="submitData()">关闭</el-button> -->
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelTicket">取消</el-button>
+        <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
+        <!-- <el-button @click="cancelSelection">取 消</el-button>
+        <el-button type="primary" @click="changeInvoice">确 定</el-button> -->
+      </span>
+    </el-dialog>
+    <!-- 保存 -->
+    <div class="footer" style="margin-top: 260px; float: right">
+      <el-button type="info" @click="cancel">取消</el-button>
+      <el-button type="success" @click="submitForm"
+        >提交</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getFinanceProduct,updateFinanceProduct } from "@/api/service/financeProduct/financeProduct";
+import { listCompany } from "@/api/common/company";
+export default {
+  name: "detailContract",
+  components: {},
+  data() {
+    return {
+      disabled: false,
+      //发票表格数据
+      contractList: [],
+      //选中发票数据
+      chooseTicket:[],
+      // 日期范围
+      dateRange: [],
+      pafCustomerId: "",
+      activeName: "1",
+      // 选中数组
+      ids: [],
+      // 弹出层标题
+      title: "",
+      invoiceTitle:"",
+      openInvoice : false,
+      // 总条数
+      total: 0,
+      totalCustomer: 0,
+      totalContract: 0,
+      totalProject: 0,
+      // 是否显示弹出层
+      open: false,
+      openCustomer: false,
+      openContract: false,
+      openProject: false,
+      customerName: "",
+      customerId: '',
+      fpId: "",
+      ctnId : '',
+      userName:'',
+      pafCollectionAmtFromat: "",
+      // 资方列表
+      companyList: [],
+      //余额
+      BalanceList: [],
+      multipleSelection: [],
+      //账户列表
+      AccList: [],
+      //项目列表
+      projectList: [],
+      pjtent: [],
+      proId: '',
+      pjtId: '',
+      //科目列表
+      subjectList:[],
+      current: [],
+      custent: [],
+      //合同列表
+      contractList: [],
+      content: [],
+      //发票列表
+      InvoiceList: [],
+      //数据字典
+      voucherTypeOptions: [],
+      bookkeepingOptions: [],
+      expireOptions: [],
+      profitTypeOptions: [],
+      authTypeOptions:[],
+      // 表单参数
+      form: {},
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pifName: null,
+        pifId: null,
+        pifContractId: null,
+      },
+      queryParamsInvoice: {
+        pageNum: 1,
+        pageSize: 10,
+        dateTime: [],
+        pvfProjectId: null,
+        pvfContractId: null,
+        pidCode: null,
+        pvfTYPE: null,
+        pvfInvoiceTitle : null
+      },
+      options: [],
+      value: [],
+      loading: false,
+      // 表单校验
+      rules: {
+        zfpName: [
+          {
+            required: true,
+            message: "产品名称不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpManagementId: [
+          {
+            required: true,
+            message: "资金方不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpMinimumAmount: [
+          {
+            required: true,
+            pattern: /^[0-9][0-9]{0,9}$|^[1-9][0-9]{0,9}[.]\d{1,2}$/,
+            message: "请输入正确的付款金额",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpShortestPeriod: [
+          {
+            required: true,
+            message: "最短融资账期不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpVoucherType: [
+          {
+            required: true,
+            message: "电子凭证类型不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    const zfpId = this.$route.params && this.$route.params.zfpId;
+    this.reset();
+    //this.getCompanyList();
+    //this.getList();
+    this.getDicts("zc_zfp_voucher_type").then((response) => {
+      this.voucherTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_bookkeeping").then((response) => {
+      this.bookkeepingOptions = response.data;
+    });
+    this.getDicts("zc_zfp_expire").then((response) => {
+      this.expireOptions = response.data;
+    });
+    this.getDicts("zc_zfp_profit_type").then((response) => {
+      this.profitTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_auth_type").then((response) => {
+      this.authTypeOptions = response.data;
+    });
+    getFinanceProduct(zfpId).then((response) =>{
+      this.form = response.data.zcFinanceProduct;
+      this.form.createTime = this.parseTime(new Date(response.data.zcFinanceProduct.createTime),'{y}-{m}-{d} {h}:{m}:{s}');
+      this.userName = response.data.nickName;
+      var state = this.form.zfpStatus;
+      if(state == '01'){
+        this.disabled = true ;
+      }
+      const type = "03";
+      const zfpManagementId = this.form.zfpManagementId;
+      listCompany(type,zfpManagementId).then(response =>{
+        this.companyList = response.data;
+      })
+    });
+  },
+  activated() {
+    this.reset();
+    //this.getList();
+  },
+  methods: {
+    /** 查询资方 */
+    getCompanyList(){
+      const type = "03";
+      listCompany(type).then(response =>{
+        this.companyList = response.data;
+      })
+    },
+    getList(){
+      const cifId = this.$route.params && this.$route.params.cifId;
+      //合同信息
+      getOwnContract(cifId).then((response) => {
+            this.$set(this.form, "pafContractId", cifId);
+            this.$set(this.form, "cifName", response.data.data.cifName);
+        if(response){
+            //客户信息
+            this.$set(this.form, "pafCustomerId", response.data.data.cifCustomerId);
+            this.$set(this.form, "cciName", response.data.data.cciName);
+            listContractNode(cifId).then((res) => {
+              this.contractNodeList = res.data;
+            });
+            this.queryParamsProject.pifCustomerName = response.data.data.cciName;
+            this.queryParamsAcc.ccaCustomerId = response.data.data.cifCustomerId;
+            this.queryParamsAcc.cccType = '00';
+            listAcc(this.queryParamsAcc).then((r) => {
+                this.AccList = r.data.records;
+                if(r.data.records[0].ccaId){
+                this.$set(this.form, "pafAccountId", r.data.records[0].ccaId);
+                }else{
+                  this.queryParamsAcc.ccaCustomerId = '';
+                  this.getAccList();
+                }
+            });
+        }
+      });
+    },
+
+    change(val){
+      if(val<=14){
+        this.$set(this.form, "zfpShortestPeriod", "14");
+      }
+      return ;
+    },
+    /* -------------------------合同相关---------------------------- */
+        //合同列表
+    getInvoiceList() {
+      listInvoice(this.queryParamsInvoice).then((response) => {
+        this.InvoiceList = response.data.records;
+        this.selectChecked();
+        this.total = response.data.total;
+      });
+    },
+    //打开合同选择列表
+    openTicket() {
+      this.getInvoiceList();
+      this.open = true;
+      this.title = "合同信息";
+    },
+    selectChecked() {
+      this.contractList.forEach((item) => {
+        this.InvoiceList.forEach((row) => {
+          if (row.pvfId == item.pvId) {
+            this.$nextTick(() => {
+              this.$refs.tableInvoice &&
+                this.$refs.tableInvoice.toggleRowSelection(row, true);
+            });
+          }
+        });
+      });
+    },
+    /* 多选框跨页 */
+    rowkey(row) {
+      return row.pvfId;
+    },
+    // 多选框选中数据
+    handleSelectionChange(val) {
+        this.chooseTicket = val
+    },
+    // 确认选择
+    closeTicket() {
+        if(this.chooseTicket){
+          if(this.chooseTicket[0].pvfTYPE == '01'){
+          this.contractList = this.chooseTicket
+          this.$set(this.form, "pvfDate", this.parseTime(new Date(this.contractList[0].pvfDate)));
+          this.$set(this.form, "pvfInvoiceTitle", this.contractList[0].pvfInvoiceTitle);
+          this.$set(this.form, "pvfTaxPrice", this.contractList[0].pvfTaxPrice);
+          this.$set(this.form, "pvfInvoiceNum", this.contractList[0].pvfInvoiceNum);
+          this.open = false
+        }else{
+          this.$message({
+            message: '所选发票信息异常',
+            type: 'warning'
+          });
+        }
+        }
+    },
+    //取消选择发票按钮
+    cancelTicket(){
+      if(this.contractList.length > 0){
+        this.open = false;
+      }else{
+        this.contractList = [];
+        this.$refs.tableInvoice.clearSelection()
+        this.open = false;
+      }
+    },
+    /** 清空选择发票信息 */
+    deleteTicekt() {
+      this.contractList = [];
+      this.$refs.tableInvoice.clearSelection()
+    },
+    /* 删除按钮 */
+    handleDelete(index, rows) {
+      console.log(rows,"AAAAAAAAAAA")
+      rows.splice(index, 1);
+      this.$refs.tableInvoice.clearSelection()
+      this.selectChecked();
+    },
+    onSelectAll() {
+      this.$refs.tableInvoice.clearSelection();
+    },
+    handleQuerys() {
+      this.queryParamsInvoice.pageNum = 1;
+      this.getInvoiceList();
+    },
+    resetQuerys() {
+      this.resetForm("formQuery");
+      this.handleQuerys();
+    },
+    handleInput(str) {
+      this.pafCollectionAmtFromat = amtformat(str, 2, ".", ",");
+    },
+    //发票类型
+    pvfCategoryFormat(row, column) {
+      return this.selectDictLabel(this.pvfCategoryOptions, row.pvfCategory);
+    },
+    /* ---------------------------------------------------------------------- */
+    // 多选框选中数据
+    handleCurrentChange(val) {
+      // this.currentRow = val;
+      // this.open = false;
+    },
+   
+    /* 清空 */
+    clearBoth() {
+      this.proId =  '';
+      this.pjtId = '';
+      // this.getContractList();
+      this.getProjectList();
+      this.getSubjectList();
+      this.queryParamsAcc.ccaCustomerId = null;
+      this.getAccList();
+    },
+    reset(){
+      this.form = {
+        zfpId: null,
+        zfpNumber: null,
+        zfpName: null,
+        zfpManagementId: null,
+        zfpSplit: "0",
+        zfpType:"1",
+        zfpTransfer: "0",
+        zfpRecourse: "0",
+        zfpVoucherType: null,
+        zfpCoreAccount: "0",
+        zfpSupplierAccount: "0",
+        zfpCharge: "0",
+        zfpStatus: "0",
+        zfpMinimumAmount: null,
+        zfpShortestPeriod: null,
+        zfpBookkeeping: null,
+        zfpPart: "0",
+        zfpExpire: null,
+        zfpRate: null,
+        zfpProfit: "0",
+        zfpProfitType: null,
+        zfpProfitRate: null,
+        zfpPlatform: "0",
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+       this.resetForm("form");
+    },
+/* ---------------------------------------------------------------------- */
+    // 取消按钮
+    cancel() {
+      this.reset();
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+      this.open = false;
+    },
+    /** 保存按钮 */
+    submitForm() {
+      
+      this.$refs["form"].validate((valid) => {
+        this.form.contractList = this.contractList;
+        console.log(this.form)
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "Loading",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          updateFinanceProduct(this.form)
+            .then((response) => {
+              loading.close();
+              this.msgSuccess("修改成功");
+              this.$store.dispatch("tagsView/delView", this.$route);
+              this.$router.go(-1);
+            })
+            .catch((response) => {
+              loading.close();
+            });
+        }
+      });
+    },
+    // submitData() {
+    //   this.open = false;
+    // },
+    /* //  将数字金额转换为大写金额 */
+  },
+};
+</script>
+<style>
+.single-select-table thead .el-table-column--selection .cell {
+  display: none;
+}
+
+</style>

+ 658 - 0
front-vue/src/views/service/contract/editContract.vue

@@ -0,0 +1,658 @@
+<template>
+  <div class="app-container">
+    <el-form :inline="true" ref="form" :model="form" :rules="rules" label-width="auto" style="margin-top: 20px;"  >
+      <el-form-item label="融资产品编号:" prop="zfpNumber" style="margin-left: 5%">
+          <el-input v-model="form.zfpNumber" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item label="创建人:" prop="userName" style="margin-left: 5%">
+          <el-input v-model="userName" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5.7%">
+          <el-input v-model="form.createTime" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+      <el-divider content-position="left">基本信息</el-divider>
+        <!-- <el-form-item label="融资产品编号" prop="zfpNumber">
+          <el-input v-model="form.zfpNumber" placeholder="请输入融资产品编号" />
+        </el-form-item> -->
+        <el-form-item label="融资产品名称:" prop="zfpName" style="margin-left: 5%">
+          <el-input v-model="form.zfpName" placeholder="请输入融资产品名称" :disabled="disabled" />
+        </el-form-item>
+        <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
+           <el-select
+           style= "width: 95%;"
+              v-model="form.zfpManagementId"
+              placeholder="请选择资金方"
+              clearable
+              :disabled="disabled"
+              size="small">
+              <el-option
+                v-for="(item,index) in companyList"
+                :key="index"
+                :label="item.scyName"
+                :value="item.scyId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否可拆转融:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpSplit" label="0" :disabled="disabled">否</el-radio>
+          <el-radio v-model="form.zfpSplit" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="产品类型:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpType" label="0" :disabled="disabled">正向</el-radio>
+          <el-radio v-model="form.zfpType" label="1" :disabled="disabled">反向</el-radio>
+        </el-form-item>
+         <el-divider content-position="left">平台参数</el-divider>
+
+        <el-form-item label="最小融资金额:" prop="zfpMinimumAmount" style="margin-left: 5%">
+          <el-input v-model="form.zfpMinimumAmount" placeholder="请输入最小融资金额" :disabled="disabled" />
+        </el-form-item>
+         <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
+          <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change" :disabled="disabled"/>
+        </el-form-item>
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
+          <el-radio v-model="form.zfpCharge" label="0" :disabled="disabled">否</el-radio>
+          <el-radio v-model="form.zfpCharge" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否有追索权:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpRecourse" label="0" :disabled="disabled">否</el-radio>
+          <el-radio v-model="form.zfpRecourse" label="1" :disabled="disabled">是</el-radio>
+        </el-form-item>
+        <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
+          <el-select
+          style="width: 95%;"
+            v-model="form.zfpVoucherType"
+            placeholder="请选择电子凭证类型"
+            clearable
+            :disabled="disabled"
+            size="small">
+            <el-option
+              v-for="dict in voucherTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-divider content-position="left">资方参数</el-divider>
+
+        <el-form-item label="是否需核心企业开户:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11%">
+          <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
+          <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
+          <el-select
+            v-model="form.zfpBookkeeping"
+            placeholder="请选择记账簿托管方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in bookkeepingOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否支持部分融资:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpPart" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPart" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11%">
+          <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
+        </el-form-item>
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6%">
+          <el-select
+            v-model="form.zfpExpire"
+            placeholder="请选择融资到期方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in expireOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方是否支持返佣:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpProfit" label= "0" >否</el-radio>
+          <el-radio v-model="form.zfpProfit" label= "1" >是</el-radio>
+        </el-form-item>
+        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 11.1%" v-if="form.zfpProfit== '1' ">
+          <el-select
+            v-model="form.zfpProfitType"
+            placeholder="请选择资方返佣方式"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in profitTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="资方返佣费率" prop="zfpProfitRate" style="margin-left: 5%" v-if="form.zfpProfit== '1' ">
+          <el-input v-model="form.zfpProfitRate" placeholder="请输入资方返佣费率" />
+        </el-form-item>
+        <el-form-item label="是否需平台审批:" style="margin-left: 5%">
+          <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
+          <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
+        </el-form-item>
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 11.%" >
+          <el-select
+            v-model="form.zfpAuthType"
+            placeholder="请选择签署意愿类型"
+            clearable
+            size="small">
+            <el-option
+              v-for="dict in authTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"/>
+          </el-select>
+        </el-form-item>
+        <el-divider content-position="left">关联合同</el-divider>
+        <el-form-item prop="zfcId" style="margin-left: 100px" >
+        <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
+        <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
+        <el-table :data="contractList" style="width: 1100px">
+          <el-table-column label="合同模板编号"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip />
+          <el-table-column label="合同模板名称"  align="center"  prop="zfcName"   />
+          <el-table-column label="签署方"  align="center"  prop="pvfDate"    />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.$index, contractList)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form-item>
+      </el-form>
+      <!-- 合同信息 -->
+    <el-dialog :title="invoiceTitle" :visible.sync="open" width="1120px" append-to-body>
+      <el-form :model="queryParamsInvoice"  ref="formQuery"  :inline="true"  label-width="68px"  style="margin-bottom: -21px">
+        <el-form-item label="发票标题" prop="pvfInvoiceTitle">
+          <el-input
+            v-model="queryParamsInvoice.pvfInvoiceTitle"
+            placeholder="请输入发票标题"
+            clearable
+            size="small"
+            maxlength="11"
+            @keyup.enter.native="handleQuerys"/>
+        </el-form-item>
+        <el-form-item label="开票日期" prop="dateTime">
+          <el-date-picker
+            size="small"
+            v-model="queryParamsInvoice.dateTime"
+            unlink-panels
+            style="width: 240px"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="cyan"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuerys"
+            >搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
+            >重置</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table :data="InvoiceList"
+        ref="tableInvoice"
+        class="single-select-table"
+        @selection-change="handleSelectionChange" 
+        :row-key="rowkey">
+        <el-table-column
+          type="selection"
+          :reserve-selection="true"
+          width="50"
+          align="center"/>
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template slot-scope="scope">
+            <span>{{ (queryParamsInvoice.pageNum - 1) * queryParamsInvoice.pageSize + scope.$index + 1}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="发票标题"  align="center"  prop="pvfInvoiceTitle" show-overflow-tooltip width="100" />
+        <el-table-column label="发票金额"  align="center"  prop="pvfTaxPrice"  width="125" />
+        <el-table-column label="发票张数"  align="center"  prop="pvfInvoiceNum" show-overflow-tooltip width="100" />
+        <el-table-column label="开票日期"  align="center"  prop="pvfDate"  width="95"  />
+        <el-table-column label="客户名称"  align="center"  prop="cciName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="合同名称"  align="center"  prop="cifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="项目名称"  align="center"  prop="pifName"  width="120"  show-overflow-tooltip />
+        <el-table-column label="发票类型"  align="center"  :formatter="pvfCategoryFormat"  prop="pvfCategory"  width="120" />
+        <el-table-column label="交付日期"  align="center"  prop="pvfDeliverTime"  width="95" />
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParamsInvoice.pageNum"
+        :limit.sync="queryParamsInvoice.pageSize"
+        @pagination="getInvoiceList" />
+      <!-- <el-button type="primary" @click="submitData()">关闭</el-button> -->
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="cancelTicket">取消</el-button>
+        <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
+        <!-- <el-button @click="cancelSelection">取 消</el-button>
+        <el-button type="primary" @click="changeInvoice">确 定</el-button> -->
+      </span>
+    </el-dialog>
+    <!-- 保存 -->
+    <div class="footer" style="margin-top: 260px; float: right">
+      <el-button type="info" @click="cancel">取消</el-button>
+      <el-button type="success" @click="submitForm"
+        >提交</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getFinanceProduct,updateFinanceProduct } from "@/api/service/financeProduct/financeProduct";
+import { listCompany } from "@/api/common/company";
+export default {
+  name: "editContract",
+  components: {},
+  data() {
+    return {
+      disabled: false,
+      //发票表格数据
+      contractList: [],
+      //选中发票数据
+      chooseTicket:[],
+      // 日期范围
+      dateRange: [],
+      pafCustomerId: "",
+      activeName: "1",
+      // 选中数组
+      ids: [],
+      // 弹出层标题
+      title: "",
+      invoiceTitle:"",
+      openInvoice : false,
+      // 总条数
+      total: 0,
+      totalCustomer: 0,
+      totalContract: 0,
+      totalProject: 0,
+      // 是否显示弹出层
+      open: false,
+      openCustomer: false,
+      openContract: false,
+      openProject: false,
+      customerName: "",
+      customerId: '',
+      fpId: "",
+      ctnId : '',
+      userName:'',
+      pafCollectionAmtFromat: "",
+      // 资方列表
+      companyList: [],
+      //余额
+      BalanceList: [],
+      multipleSelection: [],
+      //账户列表
+      AccList: [],
+      //项目列表
+      projectList: [],
+      pjtent: [],
+      proId: '',
+      pjtId: '',
+      //科目列表
+      subjectList:[],
+      current: [],
+      custent: [],
+      //合同列表
+      contractList: [],
+      content: [],
+      //发票列表
+      InvoiceList: [],
+      //数据字典
+      voucherTypeOptions: [],
+      bookkeepingOptions: [],
+      expireOptions: [],
+      profitTypeOptions: [],
+      authTypeOptions:[],
+      // 表单参数
+      form: {},
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        pifName: null,
+        pifId: null,
+        pifContractId: null,
+      },
+      queryParamsInvoice: {
+        pageNum: 1,
+        pageSize: 10,
+        dateTime: [],
+        pvfProjectId: null,
+        pvfContractId: null,
+        pidCode: null,
+        pvfTYPE: null,
+        pvfInvoiceTitle : null
+      },
+      options: [],
+      value: [],
+      loading: false,
+      // 表单校验
+      rules: {
+        zfpName: [
+          {
+            required: true,
+            message: "产品名称不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpManagementId: [
+          {
+            required: true,
+            message: "资金方不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpMinimumAmount: [
+          {
+            required: true,
+            pattern: /^[0-9][0-9]{0,9}$|^[1-9][0-9]{0,9}[.]\d{1,2}$/,
+            message: "请输入正确的付款金额",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpShortestPeriod: [
+          {
+            required: true,
+            message: "最短融资账期不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+        zfpVoucherType: [
+          {
+            required: true,
+            message: "电子凭证类型不能为空",
+            trigger: ["blur", "change"],
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    const zfpId = this.$route.params && this.$route.params.zfpId;
+    this.reset();
+    //this.getCompanyList();
+    //this.getList();
+    this.getDicts("zc_zfp_voucher_type").then((response) => {
+      this.voucherTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_bookkeeping").then((response) => {
+      this.bookkeepingOptions = response.data;
+    });
+    this.getDicts("zc_zfp_expire").then((response) => {
+      this.expireOptions = response.data;
+    });
+    this.getDicts("zc_zfp_profit_type").then((response) => {
+      this.profitTypeOptions = response.data;
+    });
+    this.getDicts("zc_zfp_auth_type").then((response) => {
+      this.authTypeOptions = response.data;
+    });
+    getFinanceProduct(zfpId).then((response) =>{
+      this.form = response.data.zcFinanceProduct;
+      this.form.createTime = this.parseTime(new Date(response.data.zcFinanceProduct.createTime),'{y}-{m}-{d} {h}:{m}:{s}');
+      this.userName = response.data.nickName;
+      var state = this.form.zfpStatus;
+      if(state == '01'){
+        this.disabled = true ;
+      }
+      const type = "03";
+      const zfpManagementId = this.form.zfpManagementId;
+      listCompany(type,zfpManagementId).then(response =>{
+        this.companyList = response.data;
+      })
+    });
+  },
+  activated() {
+    this.reset();
+    //this.getList();
+  },
+  methods: {
+    /** 查询资方 */
+    getCompanyList(){
+      const type = "03";
+      listCompany(type).then(response =>{
+        this.companyList = response.data;
+      })
+    },
+    getList(){
+      const cifId = this.$route.params && this.$route.params.cifId;
+      //合同信息
+      getOwnContract(cifId).then((response) => {
+            this.$set(this.form, "pafContractId", cifId);
+            this.$set(this.form, "cifName", response.data.data.cifName);
+        if(response){
+            //客户信息
+            this.$set(this.form, "pafCustomerId", response.data.data.cifCustomerId);
+            this.$set(this.form, "cciName", response.data.data.cciName);
+            listContractNode(cifId).then((res) => {
+              this.contractNodeList = res.data;
+            });
+            this.queryParamsProject.pifCustomerName = response.data.data.cciName;
+            this.queryParamsAcc.ccaCustomerId = response.data.data.cifCustomerId;
+            this.queryParamsAcc.cccType = '00';
+            listAcc(this.queryParamsAcc).then((r) => {
+                this.AccList = r.data.records;
+                if(r.data.records[0].ccaId){
+                this.$set(this.form, "pafAccountId", r.data.records[0].ccaId);
+                }else{
+                  this.queryParamsAcc.ccaCustomerId = '';
+                  this.getAccList();
+                }
+            });
+        }
+      });
+    },
+
+    change(val){
+      if(val<=14){
+        this.$set(this.form, "zfpShortestPeriod", "14");
+      }
+      return ;
+    },
+    /* -------------------------合同相关---------------------------- */
+        //合同列表
+    getInvoiceList() {
+      listInvoice(this.queryParamsInvoice).then((response) => {
+        this.InvoiceList = response.data.records;
+        this.selectChecked();
+        this.total = response.data.total;
+      });
+    },
+    //打开合同选择列表
+    openTicket() {
+      this.getInvoiceList();
+      this.open = true;
+      this.title = "合同信息";
+    },
+    selectChecked() {
+      this.contractList.forEach((item) => {
+        this.InvoiceList.forEach((row) => {
+          if (row.pvfId == item.pvId) {
+            this.$nextTick(() => {
+              this.$refs.tableInvoice &&
+                this.$refs.tableInvoice.toggleRowSelection(row, true);
+            });
+          }
+        });
+      });
+    },
+    /* 多选框跨页 */
+    rowkey(row) {
+      return row.pvfId;
+    },
+    // 多选框选中数据
+    handleSelectionChange(val) {
+        this.chooseTicket = val
+    },
+    // 确认选择
+    closeTicket() {
+        if(this.chooseTicket){
+          if(this.chooseTicket[0].pvfTYPE == '01'){
+          this.contractList = this.chooseTicket
+          this.$set(this.form, "pvfDate", this.parseTime(new Date(this.contractList[0].pvfDate)));
+          this.$set(this.form, "pvfInvoiceTitle", this.contractList[0].pvfInvoiceTitle);
+          this.$set(this.form, "pvfTaxPrice", this.contractList[0].pvfTaxPrice);
+          this.$set(this.form, "pvfInvoiceNum", this.contractList[0].pvfInvoiceNum);
+          this.open = false
+        }else{
+          this.$message({
+            message: '所选发票信息异常',
+            type: 'warning'
+          });
+        }
+        }
+    },
+    //取消选择发票按钮
+    cancelTicket(){
+      if(this.contractList.length > 0){
+        this.open = false;
+      }else{
+        this.contractList = [];
+        this.$refs.tableInvoice.clearSelection()
+        this.open = false;
+      }
+    },
+    /** 清空选择发票信息 */
+    deleteTicekt() {
+      this.contractList = [];
+      this.$refs.tableInvoice.clearSelection()
+    },
+    /* 删除按钮 */
+    handleDelete(index, rows) {
+      console.log(rows,"AAAAAAAAAAA")
+      rows.splice(index, 1);
+      this.$refs.tableInvoice.clearSelection()
+      this.selectChecked();
+    },
+    onSelectAll() {
+      this.$refs.tableInvoice.clearSelection();
+    },
+    handleQuerys() {
+      this.queryParamsInvoice.pageNum = 1;
+      this.getInvoiceList();
+    },
+    resetQuerys() {
+      this.resetForm("formQuery");
+      this.handleQuerys();
+    },
+    handleInput(str) {
+      this.pafCollectionAmtFromat = amtformat(str, 2, ".", ",");
+    },
+    //发票类型
+    pvfCategoryFormat(row, column) {
+      return this.selectDictLabel(this.pvfCategoryOptions, row.pvfCategory);
+    },
+    /* ---------------------------------------------------------------------- */
+    // 多选框选中数据
+    handleCurrentChange(val) {
+      // this.currentRow = val;
+      // this.open = false;
+    },
+   
+    /* 清空 */
+    clearBoth() {
+      this.proId =  '';
+      this.pjtId = '';
+      // this.getContractList();
+      this.getProjectList();
+      this.getSubjectList();
+      this.queryParamsAcc.ccaCustomerId = null;
+      this.getAccList();
+    },
+    reset(){
+      this.form = {
+        zfpId: null,
+        zfpNumber: null,
+        zfpName: null,
+        zfpManagementId: null,
+        zfpSplit: "0",
+        zfpType:"1",
+        zfpTransfer: "0",
+        zfpRecourse: "0",
+        zfpVoucherType: null,
+        zfpCoreAccount: "0",
+        zfpSupplierAccount: "0",
+        zfpCharge: "0",
+        zfpStatus: "0",
+        zfpMinimumAmount: null,
+        zfpShortestPeriod: null,
+        zfpBookkeeping: null,
+        zfpPart: "0",
+        zfpExpire: null,
+        zfpRate: null,
+        zfpProfit: "0",
+        zfpProfitType: null,
+        zfpProfitRate: null,
+        zfpPlatform: "0",
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+       this.resetForm("form");
+    },
+/* ---------------------------------------------------------------------- */
+    // 取消按钮
+    cancel() {
+      this.reset();
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+      this.open = false;
+    },
+    /** 保存按钮 */
+    submitForm() {
+      
+      this.$refs["form"].validate((valid) => {
+        this.form.contractList = this.contractList;
+        console.log(this.form)
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "Loading",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          });
+          updateFinanceProduct(this.form)
+            .then((response) => {
+              loading.close();
+              this.msgSuccess("修改成功");
+              this.$store.dispatch("tagsView/delView", this.$route);
+              this.$router.go(-1);
+            })
+            .catch((response) => {
+              loading.close();
+            });
+        }
+      });
+    },
+    // submitData() {
+    //   this.open = false;
+    // },
+    /* //  将数字金额转换为大写金额 */
+  },
+};
+</script>
+<style>
+.single-select-table thead .el-table-column--selection .cell {
+  display: none;
+}
+
+</style>

File diff suppressed because it is too large
+ 469 - 441
front-vue/src/views/service/credit/addCredit.vue


+ 11 - 7
front-vue/src/views/service/financeProduct/addFinanceProduct.vue

@@ -10,6 +10,7 @@
         </el-form-item>
         <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
            <el-select
+           style="width: 95%;"
               v-model="form.zfpManagementId"
               placeholder="请选择资金方"
               clearable
@@ -37,7 +38,7 @@
          <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
           <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change"/>
         </el-form-item>
-        <el-form-item label="服务费是否可退:" style="margin-left: 5%">
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
           <el-radio v-model="form.zfpCharge" label="0">否</el-radio>
           <el-radio v-model="form.zfpCharge" label="1">是</el-radio>
         </el-form-item>
@@ -64,12 +65,13 @@
           <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="是否需融资企业开户:" style="margin-left: 5%">
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11.1%">
           <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 5%">
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
           <el-select
+          style="width: 95%;"
             v-model="form.zfpBookkeeping"
             placeholder="请选择记账簿托管方式"
             clearable
@@ -85,11 +87,12 @@
           <el-radio v-model="form.zfpPart" label="0">否</el-radio>
           <el-radio v-model="form.zfpPart" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 5%">
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11.1%">
           <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
         </el-form-item>
-        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 5%">
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6.2%">
           <el-select
+          style="width: 95%;"
             v-model="form.zfpExpire"
             placeholder="请选择融资到期方式"
             clearable
@@ -121,12 +124,13 @@
         <el-form-item label="资方返佣费率" prop="zfpProfitRate" style="margin-left: 5%" v-if="form.zfpProfit== '1'">
           <el-input v-model="form.zfpProfitRate" placeholder="请输入资方返佣费率" />
         </el-form-item>
-        <el-form-item label="是否需平台审批:" style="margin-left: 5%">
+        <el-form-item label="是否需平台审批:" style="margin-left: 11.1%">
           <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
           <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 5%" >
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 12.2%" >
           <el-select
+          style="width: 95%;"
             v-model="form.zfpAuthType"
             placeholder="请选择签署意愿类型"
             clearable

+ 17 - 11
front-vue/src/views/service/financeProduct/detailFinanceProduct.vue

@@ -7,7 +7,7 @@
         <el-form-item label="创建人:" prop="userName" style="margin-left: 5%">
           <el-input v-model="userName" placeholder="请输入融资产品名称" :disabled="disabled" />
         </el-form-item>
-        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5%">
+        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5.7%">
           <el-input v-model="form.createTime" placeholder="请输入融资产品名称" :disabled="disabled" />
         </el-form-item>
       <el-divider content-position="left">基本信息</el-divider>
@@ -17,8 +17,9 @@
         <el-form-item label="融资产品名称:" prop="zfpName" style="margin-left: 5%">
           <el-input v-model="form.zfpName" placeholder="请输入融资产品名称" :disabled="disabled" />
         </el-form-item>
-        <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
+        <el-form-item  label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
            <el-select
+           style= "width: 95%;"
               v-model="form.zfpManagementId"
               placeholder="请选择资金方"
               clearable
@@ -47,16 +48,17 @@
          <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
           <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change" :disabled="disabled"/>
         </el-form-item>
-        <el-form-item label="服务费是否可退:" style="margin-left: 5%">
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
           <el-radio v-model="form.zfpCharge" label="0" :disabled="disabled">否</el-radio>
           <el-radio v-model="form.zfpCharge" label="1" :disabled="disabled">是</el-radio>
         </el-form-item>
         <el-form-item label="是否有追索权:" style="margin-left: 5%">
           <el-radio v-model="form.zfpRecourse" label="0" :disabled="disabled">否</el-radio>
-          <el-radio v-model="form.zfpRecourse" label="1" :disabled="disabled">是</el-radio>
+          <el-radio style="margin-left: 50%;" v-model="form.zfpRecourse" label="1" :disabled="disabled">是</el-radio>
         </el-form-item>
         <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
           <el-select
+          style= "width: 95%;"
             v-model="form.zfpVoucherType"
             placeholder="请选择电子凭证类型"
             clearable
@@ -75,12 +77,13 @@
           <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="是否需融资企业开户:" style="margin-left: 5%">
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11%">
           <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 5%">
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
           <el-select
+          style= "width: 95%;"
             v-model="form.zfpBookkeeping"
             placeholder="请选择记账簿托管方式"
             clearable
@@ -92,15 +95,16 @@
               :value="dict.dictValue"/>
           </el-select>
         </el-form-item>
-        <el-form-item label="是否支持部分融资:" style="margin-left: 5%">
+        <el-form-item label="是否支持部分融资:" style="float: left; margin-left: 5%">
           <el-radio v-model="form.zfpPart" label="0">否</el-radio>
           <el-radio v-model="form.zfpPart" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 5%">
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11%">
           <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
         </el-form-item>
-        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 5%">
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6%">
           <el-select
+          style="width: 95%;"
             v-model="form.zfpExpire"
             placeholder="请选择融资到期方式"
             clearable
@@ -116,8 +120,9 @@
           <el-radio v-model="form.zfpProfit" label= "0" >否</el-radio>
           <el-radio v-model="form.zfpProfit" label= "1" >是</el-radio>
         </el-form-item>
-        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 5%" v-if="form.zfpProfit== '1' ">
+        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 11.1%" v-if="form.zfpProfit== '1' ">
           <el-select
+          style="width: 95%;"
             v-model="form.zfpProfitType"
             placeholder="请选择资方返佣方式"
             clearable
@@ -136,8 +141,9 @@
           <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
           <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 5%" >
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 11.1%" >
           <el-select
+          style="width: 95%;"
             v-model="form.zfpAuthType"
             placeholder="请选择签署意愿类型"
             clearable

+ 10 - 8
front-vue/src/views/service/financeProduct/editFinanceProduct.vue

@@ -7,7 +7,7 @@
         <el-form-item label="创建人:" prop="userName" style="margin-left: 5%">
           <el-input v-model="userName" placeholder="请输入融资产品名称" :disabled="disabled" />
         </el-form-item>
-        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5%">
+        <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5.7%">
           <el-input v-model="form.createTime" placeholder="请输入融资产品名称" :disabled="disabled" />
         </el-form-item>
       <el-divider content-position="left">基本信息</el-divider>
@@ -19,6 +19,7 @@
         </el-form-item>
         <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
            <el-select
+           style= "width: 95%;"
               v-model="form.zfpManagementId"
               placeholder="请选择资金方"
               clearable
@@ -47,7 +48,7 @@
          <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
           <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change" :disabled="disabled"/>
         </el-form-item>
-        <el-form-item label="服务费是否可退:" style="margin-left: 5%">
+        <el-form-item label="服务费是否可退:" style="margin-left: 6%">
           <el-radio v-model="form.zfpCharge" label="0" :disabled="disabled">否</el-radio>
           <el-radio v-model="form.zfpCharge" label="1" :disabled="disabled">是</el-radio>
         </el-form-item>
@@ -57,6 +58,7 @@
         </el-form-item>
         <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
           <el-select
+          style="width: 95%;"
             v-model="form.zfpVoucherType"
             placeholder="请选择电子凭证类型"
             clearable
@@ -75,11 +77,11 @@
           <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="是否需融资企业开户:" style="margin-left: 5%">
+        <el-form-item label="是否需融资企业开户:" style="margin-left: 11%">
           <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
           <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 5%">
+        <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
           <el-select
             v-model="form.zfpBookkeeping"
             placeholder="请选择记账簿托管方式"
@@ -96,10 +98,10 @@
           <el-radio v-model="form.zfpPart" label="0">否</el-radio>
           <el-radio v-model="form.zfpPart" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 5%">
+        <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11%">
           <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
         </el-form-item>
-        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 5%">
+        <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6%">
           <el-select
             v-model="form.zfpExpire"
             placeholder="请选择融资到期方式"
@@ -116,7 +118,7 @@
           <el-radio v-model="form.zfpProfit" label= "0" >否</el-radio>
           <el-radio v-model="form.zfpProfit" label= "1" >是</el-radio>
         </el-form-item>
-        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 5%" v-if="form.zfpProfit== '1' ">
+        <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 11.1%" v-if="form.zfpProfit== '1' ">
           <el-select
             v-model="form.zfpProfitType"
             placeholder="请选择资方返佣方式"
@@ -136,7 +138,7 @@
           <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
           <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
         </el-form-item>
-        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 5%" >
+        <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 11.%" >
           <el-select
             v-model="form.zfpAuthType"
             placeholder="请选择签署意愿类型"

+ 96 - 18
front-vue/src/views/service/financeProduct/financeProduct.vue

@@ -6,6 +6,7 @@
          <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></column-setting>
          </div>
          <hr  style="margin-top: 16px;">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
@@ -29,7 +30,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="最短账期">
+      <el-form-item  label="最短账期">
           <el-input
           v-model="queryParams.begin"
           placeholder="请输入最短账期"
@@ -73,18 +74,18 @@
           <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
         </template>
       </el-table-column>      
-      <el-table-column label="产品编号" align="center" prop="zfpNumber" :show-overflow-tooltip="true"/>
-      <el-table-column label="产品名称" align="center" prop="zfpName" :show-overflow-tooltip="true"/>
-      <el-table-column label="产品类型" align="center" prop="zfpType" :formatter="typeFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="资金方" align="center" prop="scyName" :show-overflow-tooltip="true"/>
-      <el-table-column label="是否可拆转融" align="center" prop="zfpSplit" :formatter="splitFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="是否有追索权" align="center" prop="zfpRecourse" :formatter="recourseFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="电子凭证类型" align="center" prop="zfpVoucherType" :formatter="voucherTypeFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="服务费是否可退" align="center" prop="zfpCharge" :formatter="chargeFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="产品状态" align="center" prop="zfpStatus" :formatter="statusFormat" :show-overflow-tooltip="true"/>
-      <el-table-column label="最小融资金额" align="center" prop="zfpMinimumAmount" :show-overflow-tooltip="true"/>
-      <el-table-column label="最短账期" align="center" prop="zfpShortestPeriod" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="产品编号" align="center" prop="zfpNumber" :show-overflow-tooltip="true"  v-if="uncheckList.zfpNumber"/>
+      <el-table-column label="产品名称" align="center" prop="zfpName" :show-overflow-tooltip="true"  v-if="uncheckList.zfpName"/>
+      <el-table-column label="产品类型" align="center" prop="zfpType" :formatter="typeFormat" :show-overflow-tooltip="true"  v-if="uncheckList.zfpType"/>
+      <el-table-column label="资金方" align="center" prop="scyName" :show-overflow-tooltip="true"  v-if="uncheckList.scyName"/>
+      <el-table-column label="是否可拆转融" align="center" prop="zfpSplit" :formatter="splitFormat" :show-overflow-tooltip="true"  v-if="uncheckList.zfpSplit"/>
+      <el-table-column label="是否有追索权" align="center" prop="zfpRecourse" :formatter="recourseFormat" :show-overflow-tooltip="true"  v-if="uncheckList.zfpRecourse"/>
+      <el-table-column label="电子凭证类型" align="center" prop="zfpVoucherType" :formatter="voucherTypeFormat" :show-overflow-tooltip="true"  v-if="uncheckList.zfpVoucherType"/>
+      <el-table-column label="服务费是否可退" align="center" prop="zfpCharge" :formatter="chargeFormat" :show-overflow-tooltip="true"  v-if="uncheckList.zfpCharge"/>
+      <el-table-column label="产品状态" align="center" prop="zfpStatus" :formatter="statusFormat" :show-overflow-tooltip="true"  v-if="uncheckList.pifMold"/>
+      <el-table-column label="最小融资金额" align="center" prop="zfpMinimumAmount" :show-overflow-tooltip="true"  v-if="uncheckList.zfpMinimumAmount"/>
+      <el-table-column label="最短账期" align="center" prop="zfpShortestPeriod" :show-overflow-tooltip="true"  v-if="uncheckList.zfpShortestPeriod"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -132,11 +133,12 @@
 
 <script>
 import { listFinanceProduct,changeState } from "@/api/service/financeProduct/financeProduct";
-
-
+import ColumnSetting from "../../../components/Table/columnSetting.vue";
+import { columnQuery, columnfilter } from "@/api/common/columnSetting";
 export default {
   name: "financeProduct",
   components: {
+    ColumnSetting 
   },
   data() {
     return {
@@ -173,9 +175,59 @@ export default {
         //  pptName:[
         //   { required: true, message: "项目类型不能为空", trigger: "blur" },
         // ]
-      }
+      },
+      tableList: [
+        {
+          label: "zfpNumber",
+          value: "产品编号"
+        },
+        {
+          label: "zfpName",
+          value: "产品名称"
+        },
+        {
+          label: "zfpType",
+          value: "产品类型"
+        },
+        {
+          label: "scyName",
+          value: "资金方"
+        },
+        {
+          label: "zfpSplit",
+          value: "是否可拆转融"
+        },
+        {
+          label: "zfpRecourse",
+          value: "是否有追索权"
+        },
+        {
+          label: "zfpVoucherType",
+          value: "电子凭证类型"
+        },
+        {
+          label: "zfpStatus",
+          value: "服务费是否可退"
+        },
+        {
+          label: "zfpSplit",
+          value: "产品状态"
+        },
+        {     
+          label: "zfpMinimumAmount",
+          value: "最小融资金额"
+        },
+        {
+          label: "zfpShortestPeriod",
+          value: "最短账期"
+        },
+      ],
+      checkList: [], //筛选列选中的数据列表--显示隐藏列用
+      uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
+      selfDom: this,
+      tableId: "/service/financeProduct/list",
     };
-  },
+},
   created() {
     this.getList();
     this.getDicts("zc_zfp_split").then((response) => {
@@ -200,6 +252,9 @@ export default {
   activated(){
     this.getList();
   },
+  mounted() {
+    this.columnQuery();
+  },
   methods: {
     /** 查询融资产品列表 */
     getList() {
@@ -210,7 +265,6 @@ export default {
         this.loading = false;
       });
     },
-    
     // 取消按钮
     cancel() {
       this.open = false;
@@ -285,6 +339,30 @@ export default {
     typeFormat(row, column) {
       return this.selectDictLabel(this.typeOptions, row.zfpType);
     },
+    //获取当前客户是否之前设置过列展示隐藏
+    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);
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {