index.vue 4.03 KB
Newer Older
1
<template>
Wuyuqiu committed
2 3 4 5 6 7 8 9 10 11 12
  <div>
    <el-form
      :model="model"
      ref="modelForm"
      label-width="120px"
      label-position="right"
      size="small"
    >
      <c-col :span="8" class="col-left">
        <c-col :span="24">
          
13 14
          <el-form-item label="银行中文" prop="nam">
            <c-input v-model="model.nam" placeholder="请输入银行中文">
Wuyuqiu committed
15 16 17 18
            </c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
19 20 21 22
          
          <el-form-item label="银行英文" prop="nam1">
            <c-input v-model="model.nam1" placeholder="请输入银行英文">
            </c-input>
Wuyuqiu committed
23 24 25 26 27 28
          </el-form-item>
        </c-col>
        
      </c-col>
      <c-col :span="8" class="col-left col-right">
        <c-col :span="24">
29 30
          <el-form-item label="银行编号" prop="extkey">
            <c-input v-model="model.extkey" placeholder="请输入银行编号"></c-input>
Wuyuqiu committed
31 32 33 34
          </el-form-item>
        </c-col>

        <c-col :span="24">
35 36
          <el-form-item label="SwiftCode" prop="bic">
            <c-input
Wuyuqiu committed
37
              v-model="model.bic"
38
              placeholder="请输入SwiftCode"
Wuyuqiu committed
39
              style="width: 100%"
40
            ></c-input>
Wuyuqiu committed
41 42 43 44 45 46 47
          </el-form-item>
        </c-col>
        
      </c-col>
      <c-col :span="8" class="col-right">
        
        <c-col :span="24">
48
          <el-form-item label="客户类型" prop="ptytyp">
Wuyuqiu committed
49
            <c-select
50
              v-model="model.ptytyp"
Wuyuqiu committed
51
              style="width: 100%"
52
              placeholder="请输入客户类型"
Wuyuqiu committed
53 54 55 56 57
            >
            </c-select>
          </el-form-item>
        </c-col>

58
        <!-- <c-col :span="24">
Wuyuqiu committed
59 60 61
          <el-form-item label="ZIP-Code" prop="loczip">
            <c-input v-model="model.loczip" placeholder="请输入ZIP-Code"> </c-input>
          </el-form-item>
62
        </c-col> -->
Wuyuqiu committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
      </c-col>
      <c-col :span="24" style="text-align: right">
        <el-button size="small" @click="handleReset">重置</el-button>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="small"
          @click="doSearch()"
          >查询
        </el-button>
      </c-col>
    </el-form>
    <c-col :span="24">
      <c-paging-table
        :data="tableData"
        :columns="tableColumns"
        :pageNumber="model.pageNum"
        :pageSize="model.pageSize"
        :total="model.total"
        v-on:queryFunc="queryFunc"
        :border="true"
      >
      </c-paging-table>
    </c-col>
  </div>
88 89 90
</template>

<script>
Wuyuqiu committed
91
import codes from "~/config/CodeTable";
92
import { queryByPage } from "~/service/test/pty.js";
93 94 95 96
/**
 * SwiftCode查询
 */
export default {
Wuyuqiu committed
97 98 99 100 101
	name: 'SwiftCodeQuery',
  data() {
    return {
      tableData: [],
      tableColumns: [
102 103 104 105 106 107 108 109
        { label: "银行编号", prop: "extkey", width: "auto" },
        { label: "银行中文", prop: "nam", width: "auto" },
        { label: "银行英文", prop: "nam1", width: "auto" },
        { label: "SwiftCode", prop: "bic", width: "auto" },
        // { label: "街道", prop: "str1", width: "auto" },
        { label: "邮政编码", prop: "loczip", width: "auto" },
        { label: "城市名称", prop: "loctxt", width: "auto" },  
        
Wuyuqiu committed
110 111 112 113
      ],
      model: {
        // adr,查询条件的字段
        extkey: "",
114 115
        nam:"",
        nam1: "",
Wuyuqiu committed
116 117 118 119
        str1: "",
        bic: "",
        loctxt: "",
        loczip: "",
120
        ptytyp:"",//客户类型
Wuyuqiu committed
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
        pageNum: 1,
        pageSize: 5,
        total: 0,
      },
    };
  },
  methods: {
    handleReset() {
      this.$refs.modelForm.resetFields();
    },
    doSearch() {
      queryByPage(this.model).then((res) => {
        const list = res.list;
        this.tableData = 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.doSearch();
    },
    getCodesByKey(key) {
      return codes[key] ?? [];
    },
  },
149 150 151 152 153
}
</script>

<style>

Wuyuqiu committed
154
</style>