Infsea.vue 15.1 KB
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<template>
  <div class="eibs-tab">
    <c-list-search @form-reset="handleReset" @form-search="formSubmit">
      <template v-slot:extendsRight>
        <el-button type="primary" icon="el-icon-download" size="small" @click="exportExcel">导出</el-button>
      </template>
      <template v-slot="searchSlot">
        <el-form class="m-table-search-form" ref="paramsForm" label-position="right" label-width="110px" size="small">
          <el-row>
            <c-col :span="8">
              <el-form-item label="业务编号" prop="infcon.seaownref" style="width: 100%">
                <c-input v-model="model.infcon.seaownref" maxlength="16" placeholder="请输入业务编号"></c-input>
              </el-form-item>
            </c-col>

            <c-col :span="8">
              <el-form-item label="日期" prop="infcon.opndatfrom" style="width: 100%">
                <c-col :span="11">
李少勇 committed
19
                  <c-date-picker type="date" v-model="model.infcon.opndatfrom" placeholder="请选择起始日期" value-format="yyyy-MM-dd" style="width: 100%"></c-date-picker>
fukai committed
20 21 22 23 24
                </c-col>
                <c-col :span="2" style="text-align: center">
                  <label style="display: inline-block; width: 100%">-</label>
                </c-col>
                <c-col :span="11">
李少勇 committed
25
                  <c-date-picker type="date" v-model="model.infcon.opndatto" placeholder="请选择截至日期" style="width: 100%" value-format="yyyy-MM-dd"></c-date-picker>
fukai committed
26 27 28
                </c-col>
              </el-form-item>
            </c-col>
李少勇 committed
29
            <c-col :span="8">
fukai committed
30
              <el-form-item label="汇款类型" prop="infcon.seapaytyp" style="width: 100%">
李少勇 committed
31
                <c-select v-model="model.infcon.seapaytyp" :code="cpdtyp" style="width: 100%" placeholder="请选择汇款类型"></c-select>
fukai committed
32 33
              </el-form-item>
            </c-col>
李少勇 committed
34

fukai committed
35 36 37 38 39 40 41 42
          </el-row>

          <el-row v-show="searchSlot.searchToggle">
            <c-col :span="8">
              <el-form-item label="客户号" prop="infcon.ptyExtkey" style="width: 100%">
                <c-input v-model="model.infcon.ptyExtkey" maxlength="24" placeholder="请输入客户号"></c-input>
              </el-form-item>
            </c-col>
李少勇 committed
43
            <c-col :span="8">
fukai committed
44 45 46 47
              <el-form-item label="当事人参考号" prop="infcon.searef" style="width: 100%">
                <c-input v-model="model.infcon.searef" maxlength="16" placeholder="请输入当事人参考号"></c-input>
              </el-form-item>
            </c-col>
李少勇 committed
48

fukai committed
49 50 51 52 53 54 55
            <c-col :span="8">
              <el-form-item label="当事人BIC/名称" prop="infcon.seapty" style="width: 100%">
                <c-input v-model="model.infcon.seapty" maxlength="24" placeholder="当事人BIC编码"></c-input>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item label="币种" prop="infcon.seacur" style="width: 100%">
李少勇 committed
56 57
                <c-select-cur v-model="model.infcon.seacur" style="width: 100%" placeholder="请选择币种"
                  :isShowKeyAndLabel="true" dbCode="CURTXT" sort="SRT">
fukai committed
58 59 60 61 62 63
                </c-select-cur>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item label="金额区间" prop="infcon.seaamtfr" style="width: 100%">
                <c-col :span="11">
李少勇 committed
64 65
                  <c-input-currency v-model="model.infcon.seaamtfr" placeholder="请输入金额下限"
                    style="width: 100%"></c-input-currency>
fukai committed
66 67 68 69 70
                </c-col>
                <c-col :span="2" style="text-align: center">
                  <label style="display: inline-block; width: 100%">-</label>
                </c-col>
                <c-col :span="11">
李少勇 committed
71 72
                  <c-input-currency v-model="model.infcon.seaamtto" placeholder="请输入金额上限"
                    style="width: 100%"></c-input-currency>
fukai committed
73 74
                </c-col>
              </el-form-item>
李少勇 committed
75 76 77 78 79 80 81
            </c-col>
            <c-col :span="8">
              <el-form-item class="labelbr" :label="labelName" prop="infcon.countcode">
                <c-business-cty customModifykey="ctycod" v-model="model.infcon.countcode"
                  placeholder="请选择国家/地区代码"></c-business-cty>
              </el-form-item>
            </c-col>
fukai committed
82
            <c-col :span="8">
李少勇 committed
83 84 85 86 87
              <el-form-item label="清算路径" prop="infcon.route">
                <c-select v-model="model.infcon.route" style="width:100%" placeholder="请选择清算路径" @change="changeRoute"
                  dbCode="CPTROU" uil="CN" sort="SRT">
                </c-select>
              </el-form-item>
fukai committed
88 89 90
            </c-col>
            <c-col :span="8">
              <el-form-item label="报文类型" prop="infcon.msgtyp" style="width: 100%">
李少勇 committed
91 92
                <c-select v-model="model.infcon.msgtyp" :disabled="isMsgtyp" style="width: 100%" dbCode="RMTMSG"
                  :filterKey="msgtypFilter" placeholder="请选择报文类型">
fukai committed
93 94 95 96 97
                </c-select>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item label="前端渠道" prop="infcon.channel" style="width: 100%">
李少勇 committed
98
                <c-select v-model="model.infcon.channel" style="width: 100%" :code="channels" placeholder="请选择前端渠道">
fukai committed
99 100 101 102 103 104 105 106 107 108 109 110
                </c-select>
              </el-form-item>
            </c-col>
            <c-col :span="8">
              <el-form-item style="text-align: right;" class="checkbox-left">
                <c-checkbox v-model="model.infcon.tsnflg" true-label='X' false-label=''>同名划转标志</c-checkbox>
              </el-form-item>
            </c-col>
          </el-row>
        </el-form>
      </template>
    </c-list-search>
李少勇 committed
111
    <div>
fukai committed
112
      <c-col :span="24">
李少勇 committed
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
        <el-table v-loading="load" ref="configTable" :data="stmData.data" :showButtonFlg="true"
          height="calc(100vh - 260px)" size="small" :border="true" :highlight-current-row="true" @sort-change="sortChange"
          @row-dblclick="TableDblRow">
          <el-table-column v-for="(item, key) in columns" :key="key + Math.random()" :label="item.label" :prop="item.prop"
            :min-width="item.width" sortable="custom">
            <template slot-scope="scope">
              <div v-if="item.prop === 'stagod'">{{ getCodelabel(scope.row[item.prop], 'stagod') }}</div>
              <div style="text-align: right" v-else-if="item.prop.indexOf('nom1amt') >= 0">
                {{ moneyFormat(scope.row[item.prop], scope.row.nom1cur) }}</div>
              <div style="text-align: right" v-else-if="item.prop.indexOf('nomxrfamt') >= 0">
                {{ moneyFormat(scope.row[item.prop], 'CNY') }}</div>
              <div v-else-if="item.prop == 'channel'">{{ getLabel(channels, scope.row[item.prop]) }}</div>
              <div style="text-align: center" v-else-if="item.prop.indexOf('cptrou') >= 0">
                {{ getCodelabel(scope.row[item.prop], 'cptrou') }}</div>
              <div v-else>{{ scope.row[item.prop] }}</div>
            </template>
fukai committed
129 130 131 132 133 134 135 136
          </el-table-column>
          <el-table-column fixed="right" prop="op" label="操作" width="140px">
            <template slot="header">
              <c-col :span="11" style="text-align: center">
                <span>操作</span>
              </c-col>
              <c-button icon="el-icon-s-tools" @click="columnSetting(stmData.columns)"></c-button>
            </template>
李少勇 committed
137 138 139 140 141
            <template slot-scope="scope">
              <c-button style="margin-left: 0" type='primary' size="small" @click="toDetail(scope.row)"
                slot="reference">Info
              </c-button>
            </template>
fukai committed
142 143 144
          </el-table-column>
        </el-table>
        <div class="pagination-box">
李少勇 committed
145 146 147
          <el-pagination style="margin-right: 30px;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page.sync="pagination.pageIndex" :page-sizes="[10, 20, 50, 100, 500]"
            :page-size="pagination.pageSize" layout="total,sizes, prev, pager, next" :total="pagination.total">
fukai committed
148 149 150 151 152
          </el-pagination>
        </div>
      </c-col>
    </div>
    <!-- 自定义列属性弹框 -->
李少勇 committed
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
    <el-dialog v-dialogDrag class="showColumnDialog" v-if="showDig" :visible.sync="showDig" :title="'自定义列属性'"
      appenD-to-body style="padding:20px">
      <el-form-item label-width="0" style="display: flex;align-items: center">
        <el-checkbox-group v-model="columnGroup" @change="handleColumnChange">
          <el-checkbox
            class="selectColumnClass checkbox-left"
            style="margin-right:55px;width:150px"
            v-for="item in digColumns"
            :key="item.prop" :label="item.label"
          >
            {{ item.label }}
          </el-checkbox>
        </el-checkbox-group>
      </el-form-item>
      <span slot="footer" style="text-align:center">
        <el-checkbox
          class="selectAllClass checkbox-left"
          :indeterminate="columnGroup.length > 0 && columnGroup.length < digColumns.length"
          v-model="selectAll"
          @change="setAll"
        >全选</el-checkbox>
        <el-button type="primary" @click="saveColumnEvent()" style="margin-left:10px;">保存</el-button>
      </span>
    </el-dialog>
fukai committed
177 178 179 180 181 182 183 184 185 186 187 188
  </div>
</template>
<script>
import event from '../event'

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event],
  components: {},
  data() {
    return {
李少勇 committed
189 190 191
      load: false,
      column: '',//排序字段
      order: '',//正序倒序
fukai committed
192 193 194 195
      selectAll: [], // 是否全选
      digColumns: [], // 弹框的所有列
      columnGroup: [], // 弹框选中的列
      showDig: false, // 弹框的展示/隐藏
李少勇 committed
196 197 198 199 200
      isMsgtyp: false, //报文类型栏位灰显
      labelName: '交易对手\n国家代码',
      cpdtyp: [
        { label: '汇出汇款', value: 'O' },
        { label: '汇入汇款', value: 'I' },
fukai committed
201
      ],
李少勇 committed
202 203 204 205 206 207 208
      msgtyp: [
        { label: 'MT103', value: '103' },
        { label: 'MT202', value: '202' },
        { label: 'MT910', value: '910' },
        { label: 'CMT100', value: 'CMT' },
        { label: '境内外币清算', value: '100' },
        { label: 'Other', value: 'OTH' },
fukai committed
209
      ],
李少勇 committed
210 211 212 213
      channels: [
        { value: "YPT", label: "云平台" },
        { value: "ZT", label: "中间业务平台" },
        { value: "EJS", label: "阳光E结算" },
fukai committed
214 215 216 217 218 219 220
      ],
      // 表格相关
      stmData: {
        columns: [
          {
            label: '业务编号',
            prop: 'ownref',
李少勇 committed
221
            width: '150px',
fukai committed
222 223 224 225 226
            isShow: true
          },
          {
            label: '币种',
            prop: 'nom1cur',
李少勇 committed
227
            width: '80px',
fukai committed
228 229 230 231 232 233
            isShow: true
          },

          {
            label: '金额',
            prop: 'nom1amt',
李少勇 committed
234
            width: '150px',
fukai committed
235 236 237 238 239 240
            isShow: true

          },
          {
            label: '金额折人民币',
            prop: 'nomxrfamt',
李少勇 committed
241
            width: '150px',
fukai committed
242 243 244 245 246 247
            isShow: true

          },
          {
            label: '创建日期',
            prop: 'credat',
李少勇 committed
248
            width: '150px',
fukai committed
249 250 251 252 253
            isShow: true
          },
          {
            label: '到期日',
            prop: 'valdat',
李少勇 committed
254
            width: '150px',
fukai committed
255 256 257 258 259
            isShow: true
          },
          {
            label: '清算路径',
            prop: 'cptrou',
李少勇 committed
260
            width: '150px',
fukai committed
261 262 263 264 265
            isShow: true
          },
          {
            label: '收款人',
            prop: 'pyeExtkey',
李少勇 committed
266
            width: '180px',
fukai committed
267 268 269 270 271 272
            isShow: true

          },
          {
            label: '收款人名称',
            prop: 'pyeName',
李少勇 committed
273
            width: '300px',
fukai committed
274 275
            isShow: true
          },
李少勇 committed
276
          {
fukai committed
277 278
            label: '汇款人',
            prop: 'orcExtkey',
李少勇 committed
279
            width: '180px',
fukai committed
280 281
            isShow: true
          },
李少勇 committed
282
          {
fukai committed
283 284
            label: '汇款人名称',
            prop: 'orcName',
李少勇 committed
285
            width: '180px',
fukai committed
286 287
            isShow: true
          },
李少勇 committed
288
          {
fukai committed
289 290
            label: '汇款机构',
            prop: 'oriExtkey',
李少勇 committed
291
            width: '180px',
fukai committed
292 293
            isShow: true
          },
李少勇 committed
294
          {
fukai committed
295 296
            label: '汇款机构名称',
            prop: 'oriName',
李少勇 committed
297
            width: '180px',
fukai committed
298 299
            isShow: true
          },
李少勇 committed
300
          {
fukai committed
301 302
            label: '付款行',
            prop: 'pybExtkey',
李少勇 committed
303
            width: '180px',
fukai committed
304 305
            isShow: true
          },
李少勇 committed
306
          {
fukai committed
307 308
            label: '付款行名称',
            prop: 'pybName',
李少勇 committed
309
            width: '180px',
fukai committed
310 311 312 313 314
            isShow: true
          },
          {
            label: '渠道业务编号',
            prop: 'chnref',
李少勇 committed
315
            width: '180px',
fukai committed
316 317 318 319 320
            isShow: true
          },
          {
            label: '前端渠道',
            prop: 'channel',
李少勇 committed
321
            width: '150px',
fukai committed
322 323
            isShow: true
          },
李少勇 committed
324

fukai committed
325 326 327
          {
            label: '收款人常驻国家代码',
            prop: 'pyectycod',
李少勇 committed
328
            width: '180px',
fukai committed
329
            isShow: true
李少勇 committed
330
          },
fukai committed
331 332 333
          {
            label: '付款人常驻国家代码',
            prop: 'orcctycod',
李少勇 committed
334
            width: '180px',
fukai committed
335
            isShow: true
李少勇 committed
336
          },
fukai committed
337 338 339
          {
            label: '分行名称',
            prop: 'bchName',
李少勇 committed
340
            width: '250px',
fukai committed
341 342
            isShow: true
          },
李少勇 committed
343
          {
fukai committed
344 345
            label: '经办柜员',
            prop: 'usrNam',
李少勇 committed
346
            width: '150px',
fukai committed
347 348 349 350 351 352 353 354 355 356
            isShow: true
          },
        ],
        data: [],
      },
      pagination: {
        pageIndex: 1,
        pageSize: 10,
        total: 0
      },
李少勇 committed
357

fukai committed
358 359 360 361 362 363 364 365 366
      // 处理
      initdialog: false,
      handlerDataList: [],
      currentHandleRow: {}
    };
  },
  methods: {},
  created: function () {
  },
李少勇 committed
367
  mounted() {
fukai committed
368
    this.formSubmit();
李少勇 committed
369
    this.getdbCode('cptrou', '', 'cptrou');
fukai committed
370
  },
李少勇 committed
371
  computed: {
fukai committed
372 373 374
    columns() {
      return this.stmData.columns.filter(item => item.isShow);
    },
李少勇 committed
375
    msgtypFilter() {
fukai committed
376
      let filterKey = []
李少勇 committed
377
      if (this.model.infcon.route) {
fukai committed
378 379 380
        // if(this.model.infcon.route == 'HNHZ'){
        //  this.isMsgtyp = true
        // }else{
李少勇 committed
381
        this.isMsgtyp = false
fukai committed
382
        // }
李少勇 committed
383
      } else {
fukai committed
384 385
        this.isMsgtyp = true
      }
李少勇 committed
386 387 388 389 390 391 392
      if (this.model.infcon.route == 'SWIFT' || this.model.infcon.route == '') {
        filterKey = ['103', '200', '202', 'OTH']
      } else if (this.model.infcon.route == 'CIPS') {
        filterKey = ['CIU', 'CIV']
      } else if (this.model.infcon.route == 'JNWB') {
        filterKey = ['111', '112']
      } else if (this.model.infcon.route == 'HNHZ') {
fukai committed
393
        filterKey = ['']
李少勇 committed
394 395
      } else if (this.model.infcon.route == 'OTHER') {
        filterKey = ['BEP', 'BEQ', 'BES', 'HVP', 'HVQ', 'HVR']
fukai committed
396 397 398 399 400 401 402 403 404 405
      }
      return filterKey
    },
  },
};
</script>
<style scope>
.m-table-search {
  padding: 20px 0px 10px 0px;
}
李少勇 committed
406 407 408

.labelbr {
  white-space: pre-line
fukai committed
409
}
李少勇 committed
410

fukai committed
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
.pagination-box {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  background: #fff;
  margin-top: 5px;
}

.el-dialog__body {
  padding: 10px 5px 50px;
}

.m-table-search {
  padding: 20px 0px 10px 0px;
}

.btn-group-wrap {
  max-height: 200px;
  width: 100%;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-item {
  margin-bottom: 10px;
  margin-right: 10px;
}
</style>