Infsea.vue 13.7 KB
Newer Older
唐贵贤 committed
1 2
<template>
  <div class="eibs-tab">
3 4 5 6
    <c-list-search
      @form-reset="handleReset('paramsForm')"
      @form-search="handleSearch"
    >
唐贵贤 committed
7
      <template v-slot="searchSlot">
8 9 10 11 12 13 14 15 16 17 18
        <el-form
          class="m-table-search-form"
          ref="paramsForm"
          label-position="left"
          label-width="110px"
          size="small"
          :model="model"
        >
          <el-row>
            <c-col :span="8">
              <el-form-item
wangna committed
19
                label="信用证编号"
20 21 22
                prop="infcon.seaownref"
                style="width: 100%"
              >
唐贵贤 committed
23
                <c-input
24
                  v-model="model.infcon.seaownref"
唐贵贤 committed
25
                  maxlength="16"
wangna committed
26
                  placeholder="请输入信用证编号"
唐贵贤 committed
27 28 29
                ></c-input>
              </el-form-item>
            </c-col>
30 31

            <c-col :span="8">
唐贵贤 committed
32
              <el-form-item
wangna committed
33
                label="开立日期"
34 35
                prop="infcon.opndatfrom"
                style="width: 100%"
唐贵贤 committed
36
              >
37 38 39 40
                <c-col :span="11">
                  <c-date-picker
                    type="date"
                    v-model="model.infcon.opndatfrom"
wangna committed
41
                    placeholder="请选择起始日期"
42 43 44 45 46 47 48 49 50 51 52
                    value-format="yyyy-MM-dd"
                    style="width: 100%"
                  ></c-date-picker>
                </c-col>
                <c-col :span="2" style="text-align: center">
                  <label style="display: inline-block; width: 100%">-</label>
                </c-col>
                <c-col :span="11">
                  <c-date-picker
                    type="date"
                    v-model="model.infcon.opndatto"
wangna committed
53
                    placeholder="请选择截止日期"
54 55 56 57 58 59 60
                    style="width: 100%"
                    value-format="yyyy-MM-dd"
                  ></c-date-picker>
                </c-col>
              </el-form-item>
            </c-col>
            <c-col :span="8">
wangna committed
61 62 63 64 65
              <el-form-item
                label="业务简略信息"
                prop="infcon.nam"
                style="width: 100%"
              >
唐贵贤 committed
66
                <c-input
67 68
                  v-model="model.infcon.nam"
                  maxlength="40"
wangna committed
69
                  placeholder="请输入业务简略信息"
70
                  style="width: 100%"
唐贵贤 committed
71 72 73
                ></c-input>
              </el-form-item>
            </c-col>
74 75 76 77
          </el-row>

          <el-row v-show="searchSlot.searchToggle">
            <c-col :span="8">
wangna committed
78 79 80 81 82
              <el-form-item
                label="当事人参考号"
                prop="infcon.searef"
                style="width: 100%"
              >
唐贵贤 committed
83
                <c-input
84 85
                  v-model="model.infcon.searef"
                  maxlength="16"
wangna committed
86
                  placeholder="请输入当事人参考号"
唐贵贤 committed
87 88 89
                ></c-input>
              </el-form-item>
            </c-col>
wangna committed
90

91
            <c-col :span="8">
wangna committed
92 93 94 95 96 97 98 99 100 101 102 103
              <el-form-item
                label="当事人编号"
                prop="infcon.pty.extkey"
                style="width: 100%"
              >
                <c-input
                  v-model="model.infcon.pty.extkey"
                  maxlength="24"
                  placeholder="请输入当事人编号"
                ></c-input>
              </el-form-item>
            </c-col>
104

wangna committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118
            <c-col :span="8">
              <el-form-item
                label="当事人名称"
                prop="infcon.pty.nam"
                style="width: 100%"
              >
                <c-input
                  v-model="model.infcon.pty.nam"
                  maxlength="40"
                  placeholder="请输入当事人名称"
                  disabled
                ></c-input>
              </el-form-item>
            </c-col>
119 120

            <c-col :span="8">
wangna 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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
              <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.searol"
                style="width: 100%"
              >
                <c-select
                  v-model="model.infcon.searol"
                  style="width: 100%"
                  placeholder="请选择当事人角色"
                >
                  <el-option
                    v-for="item in codes.searol1"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </c-select>
              </el-form-item>
            </c-col>

            <c-col :span="8">
              <el-form-item
                label="客户经理"
                disabled
                prop="infcon.usr.extkey"
                style="width: 100%"
              >
                <c-input
                  v-model="model.infcon.usr.extkey"
                  maxlength="8"
                  placeholder="请输入客户经理"
                  disabled
                ></c-input>
              </el-form-item>
            </c-col>
171 172 173

            <c-col :span="8">
              <el-form-item
wangna committed
174
                label="业务状态"
175 176 177
                prop="infcon.seasta"
                style="width: 100%"
              >
唐贵贤 committed
178
                <c-select
179
                  v-model="model.infcon.seasta"
唐贵贤 committed
180
                  style="width: 100%"
wangna committed
181
                  placeholder="请选择业务状态"
唐贵贤 committed
182
                >
183 184 185 186 187 188 189
                  <el-option
                    v-for="item in codes.seasta"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
唐贵贤 committed
190 191 192
                </c-select>
              </el-form-item>
            </c-col>
唐贵贤 committed
193

194 195
            <c-col :span="8">
              <el-form-item
wangna committed
196
                label="币种"
197 198 199
                prop="infcon.seacur"
                style="width: 100%"
              >
唐贵贤 committed
200
                <c-select
201
                  v-model="model.infcon.seacur"
唐贵贤 committed
202
                  style="width: 100%"
wangna committed
203
                  placeholder="请选择币种"
唐贵贤 committed
204
                >
205 206 207 208 209 210 211
                  <el-option
                    v-for="item in codes.curtxt1"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
唐贵贤 committed
212 213 214
                </c-select>
              </el-form-item>
            </c-col>
215 216

            <c-col :span="8">
wangna committed
217
              <el-form-item label="金额区间" style="width: 100%">
218 219 220
                <c-col :span="11">
                  <c-input
                    v-model="model.infcon.seaamtfr"
wangna committed
221
                    placeholder="请输入金额下限"
222 223 224 225 226 227 228 229 230
                    style="width: 100%"
                  ></c-input>
                </c-col>
                <c-col :span="2" style="text-align: center">
                  <label style="display: inline-block; width: 100%">-</label>
                </c-col>
                <c-col :span="11">
                  <c-input
                    v-model="model.infcon.seaamtto"
wangna committed
231
                    placeholder="请输入金额上限"
232 233 234
                    style="width: 100%"
                  ></c-input>
                </c-col>
唐贵贤 committed
235 236
              </el-form-item>
            </c-col>
237 238
          </el-row>
        </el-form>
唐贵贤 committed
239 240
      </template>
    </c-list-search>
xionglin committed
241 242 243 244 245 246
     <c-col :span="24" style="margin-top: 10px">
      <c-button class="medium_bcs" size="medium" type="primary" style="margin-left: 0px" title="LTTOPN"
        @click="toLttopn">
        转让信用证开立
      </c-button>
    </c-col>
wangna committed
247

248
    <c-col :span="24">
wangna committed
249 250 251 252 253
      <c-istream-table
        :list="stmData.data"
        :columns="stmData.columns"
        :showButtonFlg="true"
      >
254
        <!-- 自定义组件里加了最右边的一列”操作“ -->
255
        <el-table-column fixed="right" prop="op" width="140px">
唐贵贤 committed
256
          <template slot="header">
257
            <!-- 插槽里放了一个文字 一个按钮 -->
wangna committed
258 259 260
            <c-col :span="11" style="text-align: center"
              ><span>操作</span></c-col
            >
261
            <!-- <c-col :span="12" style="text-align: right"
唐贵贤 committed
262
              ><c-button icon="el-icon-s-tools"></c-button
263
            ></c-col> -->
唐贵贤 committed
264 265
          </template>
          <template slot-scope="scope">
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
            <!-- 申请一个弹出主键放在插槽,加工已渲染的数据 -->
            <el-popover
              placement="top-start"
              title="历史信息"
              width="800"
              trigger="click"
              :ref="'popover_' + scope.row.IDX"
            >
              <div
                style="
                  text-align: right;
                  margin-top: -30px;
                  margin-right: 5px;
                  font-size: 16px;
                "
281
              >
282 283 284 285
                <span
                  class="el-icon-close"
                  @click="closeTrn('popover_' + scope.row.IDX)"
                />
286
              </div>
287 288 289 290 291 292 293 294 295 296 297 298 299
              <c-istream-table :list="trnData.data" :columns="trnData.columns">
                <el-table-column prop="op" label="操作" width="0">
                  <template slot-scope="scope">
                    <c-button
                      style="margin-left: 0"
                      size="small"
                      @click="display(scope.row['INR'])"
                    >
                      详情
                    </c-button>
                  </template>
                </el-table-column>
              </c-istream-table>
300 301 302
              <c-button
                style="margin-left: 0"
                size="small"
303 304
                @click="getTrnInfo(scope.$index, scope.row)"
                slot="reference"
305
              >
306
                详情
307
              </c-button>
308
            </el-popover>
唐贵贤 committed
309
            <c-button
310
              style="margin-left: 5px"
唐贵贤 committed
311 312
              size="small"
              type="primary"
wangna committed
313 314 315
              @click="
                getButtons(scope.row['信用证编号'], scope.row['关闭日期'])
              "
316 317
            >
              处理
唐贵贤 committed
318
            </c-button>
319
          </template>
唐贵贤 committed
320
        </el-table-column>
唐贵贤 committed
321
      </c-istream-table>
322
    </c-col>
323 324 325 326 327

    <m-busbtn
      ref="childs"
      :ownref="ownref"
      trnCode="letsel"
328
      ownrefPath="ltdgrp"
329 330 331 332 333
      tabIndex="9"
      :model="letselModel"
      @onChoose="onChoose"
      >11</m-busbtn
    >
唐贵贤 committed
334 335 336
  </div>
</template>
<script>
337
import Utils from "~/utils/index";
338
import Api from "~/service/Api";
wangren committed
339
import commonProcess from "~/mixin/commonProcess";
唐贵贤 committed
340 341
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infltd/Event";
342
import LetselModel from "~/model/Letsel";
wangna committed
343
import BusNavbar from "./BusNavbar";
唐贵贤 committed
344 345 346 347

export default {
  inject: ["root"],
  props: ["model", "codes"],
wangren committed
348
  mixins: [commonProcess],
349
  components: { "m-busbtn": BusNavbar },
唐贵贤 committed
350 351
  data() {
    return {
352 353
      letselModel: new LetselModel().data,
      curinr: "",
354 355 356 357
      ownref: "",
      dialogTableVisible: false,
      trnData: {
        columns: [
wangna committed
358 359 360 361
          '0 8 "交易ID" 100',
          '1 1 "信用证编号" 150',
          '2 2 "交易名称" 195',
          '3 3 "条目" 80 4 7',
wangna committed
362 363 364 365 366 367 368 369 370
          //   '4 4 "业务状态" 65 1 0 1 RELSTA',
          {
            index: 4,
            position: 4,
            width: 100,
            pattern: "code",
            label: "业务状态",
            code: this.codes.relstaEN,
          },
wangna committed
371 372 373
          '5 5 "币种" 80',
          '6 6 "相关金额" 150 2 8 1 5',
          '7 7 "标识" 100',
374 375 376
        ],
        data: [],
      },
唐贵贤 committed
377 378
      stmData: {
        columns: [
wangna committed
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
          '1 1 "信用证编号" 120',
          '2 2 "客户经理" 100',
          '3 12 "开立日期" 150 4 7',
          '4 13 "到期日" 150 4 7',
          '5 14 "关闭日期" 150 4 7',
          '6 3 "分行名称" 140',
          '7 9 "PTA编号" 100',
          '8 4 "第一当事人编号" 133',
          '9 5 "第一受益人名称" 133',
          '10 6 "第一国内受益人名称" 191',
          '11 7 "第二当事人编号" 133',
          '12 8 "第二受益人名称" 133',
          '13 10 "第三当事人编号" 133',
          '14 11 "通知行" 133',
          '15 15 "金额币种" 100',
          '16 17 "金额" 100 2 8 1 15',
          '17 16 "余额币种" 100',
          '18 18 "余额" 100 2 8 1 17',
唐贵贤 committed
397 398 399 400 401
        ],
        data: [],
      },
    };
  },
402

403 404
  methods: {
    ...Event,
wangna committed
405
    async getButtons(ownref, closedDate) {
406
      this.ownref = ownref;
wangna committed
407
      this.letselModel.clsflg = (closedDate ?? "").trim() === "" ? "" : "C";
408 409 410
      this.$refs.childs.initdialog = true;
      console.log("ownref:" + ownref);
    },
411
    async onChoose(code, prePageId) {
412
      //跳转交易
413
      // this.$router.history.push("/business/" + code);
414
      this.$router.push({ name: code.charAt(0).toUpperCase() + code.substring(1), params: { prePageId } });
415 416
      this.$refs.childs.initdialog = false;
    },
417
    async getLetSelInfo(code) {
418 419 420 421 422 423
      //跳转交易
      this.$router.history.push("/business/" + code);
      this.$refs.childs.initdialog = false;
    },

    async getTrnInfo(idx, row) {
424
      this.model.infcon.objinr = row["INR"];
425
      this.model.ledgrp.rec.inr = row["INR"];
426 427 428 429 430 431 432 433 434
      this.model.infcon.chksubcon = "X";

      this.dialogTableVisible = true;
      let rtnmsg = await this.executeDefault("infcon.chksubcon");

      if ((rtnmsg.respCode = SUCCESS)) {
        this.trnData.data = rtnmsg.data.infcon_trnstm.rows;
      }
    },
435 436 437 438
    closeTrn(refId) {
      this.$refs[refId].doClose();
    },

439 440
    toLttopn() {
      this.$router.history.push("/business/lttopn");
441
    },
442
  },
唐贵贤 committed
443 444 445
  created: function () {},
};
</script>
446
<style></style>