Infsea.vue 6.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<template>
  <div class="eibs-tab">
    <!-- 参照TD上infxxx,如infpty/infact交易的search panel面板,对应布局查询条件字段 -->
    <!-- ----------左 ---------->
    <c-col :span="12" class="col-left">
      <c-col :span="24">
        <!-- Account No. -->
        <el-form-item label="资金账号" prop="extkey">
            <c-input
                v-model="model.extkey"
zhouqian committed
11
                placeholder="请输入资金账号"
12 13 14 15 16 17 18 19 20
            >
            </c-input>
        </el-form-item>
    </c-col>
    <c-col :span="24">
      <!-- Holding Party -->
        <el-form-item label="客户账户" prop="ptyExtkey">
            <c-input
                v-model="model.ptyExtkey"
zhouqian committed
21
                placeholder="请输入客户账户"
22 23 24 25 26 27 28 29
            >
            </c-input>
        </el-form-item>
    </c-col>
      <c-col :span="24">
        <el-form-item label="账号类型" prop="typ">
          <c-select
            v-model="model.typ"
zhouqian committed
30
            placeholder="请选择账号类型"
31 32 33 34 35 36 37 38 39 40 41 42
            style="width: 100%"
            :code="getCodesByKey('recgrptyp')"
          ></c-select>
        </el-form-item>
      </c-col>
    </c-col>
    <!-- =========================------------- 右 ----------======================= -->
    <c-col :span="12" class="col-right">
      <c-col :span="24">
        <el-form-item label="账号名称" prop="nam">
          <c-input
            v-model="model.nam"
zhouqian committed
43
            placeholder="请输入账号名称"
44 45 46 47 48 49 50 51 52
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="国际银行账户号 " prop="iban">
          <c-input
            v-model="model.iban"
            maxlength="34"
zhouqian committed
53
            placeholder="请输入国际银行账户号"
54 55 56 57 58 59 60 61 62
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="账号币种" prop="cur">
          <c-select
            v-model="model.cur"
            style="width: 100%"
zhouqian committed
63
            placeholder="请选择账号币种"
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
            :code="getCodesByKey('infled_Cur')"
          >
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>

    <c-col :span="24">
      <c-col :span="12" style="text-align: left">
        <el-button type="primary" size="small" @click="actAdd">新增</el-button>
      </c-col>
      <c-col :span="12" style="text-align: right">
        <el-button size="small" @click="handleReset">重置</el-button>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="small"
81
          @click="onSearch()"
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
          >查询
        </el-button>
      </c-col>
    </c-col>
    <c-col :span="24">
      <c-paging-table 
        :data="actData"
        :columns="actColumns"
        :pageNumber="model.pageNum"
        :pageSize="model.pageSize"
        :total="model.total"
        v-on:queryFunc="queryFunc"
        :border="true"
      >
        <c-table-column fixed="right" prop="op" label="操作" width="240px">
          <template slot-scope="{ scope }">
            <c-button
              style="margin-left: 0"
              size="small"
              @click="actInfo(scope.$index, scope.row)"
              >详情</c-button
            >
            <c-button
              style="margin-left: 5px"
              size="small"
              type="primary"
              @click="actEdit(scope.$index, scope.row)"
              >修改</c-button
            >
            <c-button
              size="small"
              style="margin-left: 5px"
              @click="actDelete(scope.$index, scope.row)"
              >删除</c-button
            >
            <el-popover placement="top-start" width="50" trigger="click">
              <ul class="table-button-item-list">
                <li>
                  <c-button size="small" style="margin-left: 0">指派</c-button>
                </li>
                <li>
                  <c-button size="small" style="margin-left: 0">删除</c-button>
                </li>
              </ul>
              <a
                slot="reference"
                href="javascript:void(0)"
                style="margin-left: 5px"
              >
                <i class="el-icon-more"></i>
              </a>
            </el-popover>
          </template>
        </c-table-column>
      </c-paging-table>
    </c-col>
  </div>
</template>

<script>
import codes from "~/config/CodeTable";

import { queryByPage } from "~/service/test/act.js";

export default {
  name: "",
  props: ["model"],
  inject: ["root"],
  data() {
    return {
      actData: [],
      actColumns: [
        { label: 'HolPtyExtkey', prop: 'holPtyExtkey', width: '200' },
				{ label: 'SerPtyExtkey', prop: 'serPtyExtkey', width: '200' },
zhouqian committed
156
        { label: '账号名称', prop: 'nam', width: '200' },
157 158 159 160 161
				{ label: '账号类型', prop: 'typ', width: '100' },
				{ label: '账号币种', prop: 'cur', width: '100' },
				{ label: '资金账号', prop: 'extkey', width: '200' },
				{ label: '账号开户机构的账号', prop: 'holacc', width: '200' },
				{ label: '账号提供机构的账号', prop: 'seracc', width: '200' },
zhouqian committed
162 163
        { label: '客户账户', prop: 'serPtyExtkey', width: '200' },
        { label: '国际银行账户号', prop: 'iban', width: '200' },
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
			],
    };
  },
  computed: {
  },
  activated() {
    const { update } = this.$route.params
    if (update) {
      this.onInfactSearch()
    }
  },
  methods: {
    handleReset() {
      this.root.$refs.modelForm.resetFields();
    },
179 180 181 182 183 184
    onSearch(){
        this.model.pageNum = 1;
        this.model.pageSize = 5;
        this.onInfactSearch();

    },
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
    onInfactSearch() {
			queryByPage(this.model).then(res => {
        /**
         * pageNumber: 0
         * pageSize:	0
         * total: 69
         * totalPage: 0
         */
        const list = res.list
        this.actData = list
        this.model.pageNum = res.pageNumber
        this.model.pageSize = res.pageSize
        this.model.total = res.total
      }) 
		},
    queryFunc(pageNumber, pageSize) {
      this.model.pageNum = pageNumber
      this.model.pageSize = pageSize
      this.onInfactSearch()
    },
    getCodesByKey(key) {
      return codes[key] ?? [];
    },
    actAdd() {
			this.$router.push(`/statics/dbaact`)
		},
    actInfo(index, row) {
			this.$router.push(`/statics/dbiact/${row.inr}`)
		},
    actEdit(index, row) {
			this.$router.push(`/statics/dbeact/${row.inr}`)
		},
    actDelete(index, row) {
			this.$router.push(`/statics/dbdact/${row.inr}`)
		},
  },
};
</script>

<style scoped>
.table-button-item-list {
  padding: 0;
  margin: 0;
}
.table-button-item-list li {
  list-style: none;
  padding: 5px 0;
  text-align: center;
  color: #606266;
  cursor: pointer;
}</style>