Infsea.vue 5.12 KB
<template>
  <div class="eibs-tab">
    <c-list-search @form-reset="handleReset" @form-search="handleSearch">
      <!-- 持续展示区 -->
      <template v-slot="searchSlot">
        <el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small" :model="model">
          <el-row>
            <c-col :span="8">
              <el-form-item label="业务编号" style="width: 100%">
                <c-input v-model="model.ownref" maxlength="16" placeholder="请输入业务编号"></c-input>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item label="协议编号" style="width: 100%">
                <c-input v-model="model.objref" maxlength="16" placeholder="请输入协议编号"></c-input>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item label="客户号" style="width: 100%" prop="extkey">
                <c-input v-model="model.extkey" maxlength="24" placeholder="请输入客户号"></c-input>
              </el-form-item>
            </c-col>
          </el-row>
        </el-form>
      </template>
    </c-list-search>

    <el-col :span="24" style="margin-top: 10px;margin-bottom: 10px;">
      <c-button class="medium_bcs" size="medium" type="primary"  @click="toOpn('fcnopn')" style="margin-left: 0px">
        分离式协议签署
      </c-button>
    </el-col>
    
    <el-col :span="24" style="margin-top: 10px">
      <div style="height: 90%">
        <c-col :span="24">
          <el-table id='inffcnBSTableRef' ref="inffcnBSTableRef" v-loading="load" :data="tableData" style="width:100%" height="calc(100vh - 400px)" size="small" :border="true" :highlight-current-row="true">
            <el-table-column v-for="(item,key) in columns" :key="key" :label="item.label" :prop="item.prop" sortable="custom" :min-width="item.width">
              <template slot-scope="scope">
                <div >{{scope.row[item.prop]}}</div>
              </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="150px">
              <template slot="header">
                <c-col :span="11" style="text-align: center">
                  <span>操作</span>
                </c-col>
              </template>
              <template slot-scope="scope">
                <c-button style="margin-left: 0" type='primary' size="small" @click="toCan(scope.row)" slot="reference">注销
                </c-button>
              </template>
            </el-table-column>
          </el-table>
          <el-pagination layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" :page-size="pagination.pageSize" :current-page="pagination.pageNum"  @size-change="handleSizeChange" @current-change="currentChange">
          </el-pagination>
        </c-col>
      </div>
    </el-col>
  </div>
</template>
<script>
import BusNavbar from "~/components/business/BusNavbar";
import event from "../event";
import Default from "../model/default";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event, Default],
  components: { "m-busbtn": BusNavbar },
  data() {
    return {
      load: false,
      tableData: [],
      pagination: {
        pageNum: 1,
        pageSize: 10,
        total: 0
      },
      columns: [  
        {
          prop: "ownref",
          label: "业务参考号",
          width: 150,
        },
        {
          prop: "objref",
          label: "协议编号",
          width: 150,
        },
        {
          prop: "cusnam",
          label: "申请人名称",
          width: 150,
        },
        {
          prop: "opndat",
          label: "开立日期",
          width: 150,
        },
        {
          prop: "expdat",
          label: "失效日期",
          width: 150,
        },
        {
          prop: "sindat",
          label: "签署日期",
          width: 150,
        },
        {
          prop: "sinstadesc",
          label: "签署状态",
          width: 150,
        },
      ]
    };
  },
  computed: {
  },
  methods: {
    	// pageSize改变
		handleSizeChange(val) {
			this.pagination.pageNum = 1;
			this.pagination.pageSize = val;
			this.handleSearch();
		},
    async currentChange(num) {
      this.pagination.pageNum = num;
      this.handleSearch();
    },
    async onChoose(code, prePageId) {
      //跳转交易
      this.routerPush({
        name: code.charAt(0).toUpperCase() + code.substring(1),
        params: { prePageId }
      });
      this.$refs.childs.initdialog = false;
    },

    closeTrn(refId) {
      this.$refs[refId].doClose();
    },

    toCan(row) {
      console.log('row:',row)
      console.log('inr:',row.inr)
      if (row.sinsta != 'O') {
        this.$notify({
          title: '该笔交易无法注销!',
          message: '该笔交易无法注销!',
          type: 'error',
        });
        return
      }
      this.routerPush({
        path: "/business/fcncan",
        query: { inr: row.inr }
      });
    }
  },
  created: function() {},
  watch: {
    "model.gidgrp.rec.ownref": function() {}
  }
};
</script>
<style scoped>
</style>