Infsea.vue 15.8 KB
Newer Older
wangguangchao committed
1 2 3 4 5 6 7 8 9 10 11 12
<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"
        >
          <el-row>
潘际乾 committed
13
            <c-col :span="24">
14
              <c-col :span="8">
wangguangchao committed
15
                <el-form-item
wangna committed
16
                  label="信用证编号"
wangguangchao committed
17 18 19 20 21 22
                  prop="infcon.seaownref"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.seaownref"
                    maxlength="16"
wangna committed
23
                    placeholder="请输入信用证编号"
wangguangchao committed
24 25 26 27
                  ></c-input>
                </el-form-item>
              </c-col>

28
              <!-- <c-col :span="2"> &nbsp; </c-col> -->
29

30
              <c-col :span="8">
wangguangchao committed
31
                <el-form-item
wangna committed
32
                  label="开立日期"
liushikai committed
33
                  prop="infcon.opndatfrom"
wangguangchao committed
34 35
                  style="width: 100%"
                >
36
                  <c-col :span="11">
liushikai committed
37 38 39 40
                    <c-date-picker
                      type="date"
                      v-model="model.infcon.opndatfrom"
                      style="width: 100%"
wangna committed
41
                      placeholder="请选择起始日期"
liushikai committed
42 43 44 45 46 47
                      value-format="yyyy-MM-dd"
                    ></c-date-picker>
                  </c-col>
                  <c-col :span="2" style="text-align: center">
                    <label style="display: inline-block; width: 100%">-</label>
                  </c-col>
48
                  <c-col :span="11">
liushikai committed
49 50 51 52
                    <c-date-picker
                      type="date"
                      v-model="model.infcon.opndatto"
                      style="width: 100%"
wangna committed
53
                      placeholder="请选择截止日期"
liushikai committed
54 55 56
                      value-format="yyyy-MM-dd"
                    ></c-date-picker>
                  </c-col>
wangguangchao committed
57 58
                </el-form-item>
              </c-col>
liushikai committed
59

60
              <c-col :span="8">
wangguangchao committed
61
                <el-form-item
wangna committed
62
                  label="当事人参考号"
wangguangchao committed
63 64 65 66 67 68
                  prop="infcon.searef"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.searef"
                    maxlength="16"
wangna committed
69
                    placeholder="请输入当事人参考号"
wangguangchao committed
70 71 72 73 74 75
                  ></c-input>
                </el-form-item>
              </c-col>
            </c-col>
          </el-row>
          <el-row v-show="searchSlot.searchToggle">
潘际乾 committed
76
            <c-col :span="24">
wangguangchao committed
77 78
              <c-col :span="8">
                <el-form-item
wangna committed
79
                  label="当事人编号"
wangguangchao committed
80 81 82 83 84 85
                  prop="infcon.pty.extkey"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.pty.extkey"
                    maxlength="24"
wangna committed
86
                    placeholder="请输入当事人编号"
wangguangchao committed
87 88 89 90 91 92
                  ></c-input>
                </el-form-item>
              </c-col>

              <c-col :span="8">
                <el-form-item
wangna committed
93
                  label="当事人名称"
wangguangchao committed
94 95 96 97 98 99
                  prop="infcon.pty.nam"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.pty.nam"
                    maxlength="40"
wangna committed
100
                    placeholder="请输入当事人名称"
wangguangchao committed
101 102 103 104 105
                  ></c-input>
                </el-form-item>
              </c-col>
              <c-col :span="8">
                <el-form-item
wangna committed
106
                  label="当事人BIC编码"
wangguangchao committed
107 108 109 110 111 112
                  prop="infcon.seapty"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.seapty"
                    maxlength="24"
wangna committed
113
                    placeholder="请输入当事人BIC编码"
wangguangchao committed
114 115 116 117 118
                  ></c-input>
                </el-form-item>
              </c-col>
            </c-col>

潘际乾 committed
119
            <c-col :span="24">
liushikai committed
120 121
              <c-col :span="8">
                <el-form-item
wangna committed
122
                  label="业务简略信息"
liushikai committed
123 124 125 126 127 128
                  prop="infcon.nam"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.nam"
                    maxlength="40"
wangna committed
129
                    placeholder="请输入业务简略信息"
liushikai committed
130 131 132
                  ></c-input>
                </el-form-item>
              </c-col>
wangguangchao committed
133 134
              <c-col :span="8">
                <el-form-item
wangna committed
135
                  label="当事人角色"
wangguangchao committed
136 137 138 139 140 141
                  prop="infcon.searol"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.infcon.searol"
                    style="width: 100%"
wangna committed
142
                    placeholder="请选择当事人角色"
wangyanjiao committed
143
                    :code="codes.payrol"
wangguangchao committed
144 145 146 147
                  >
                  </c-select>
                </el-form-item>
              </c-col>
148

wangguangchao committed
149 150
              <c-col :span="8">
                <el-form-item
wangna committed
151
                  label="客户经理"
wangguangchao committed
152 153 154 155 156 157
                  prop="infcon.usr.extkey"
                  style="width: 100%"
                >
                  <c-input
                    v-model="model.infcon.usr.extkey"
                    maxlength="8"
wangna committed
158
                    placeholder="请输入客户经理"
wangguangchao committed
159 160 161 162
                  ></c-input>
                </el-form-item>
              </c-col>
            </c-col>
潘际乾 committed
163
            <c-col :span="24">
wangguangchao committed
164 165
              <c-col :span="8">
                <el-form-item
wangna committed
166
                  label="业务状态"
wangguangchao committed
167 168 169 170 171 172
                  prop="infcon.seasta"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.infcon.seasta"
                    style="width: 100%"
wangna committed
173
                    placeholder="请选择业务状态"
wangyanjiao committed
174
                    :code="codes.seasta"
wangguangchao committed
175 176 177 178 179 180
                  >
                  </c-select>
                </el-form-item>
              </c-col>
              <c-col :span="8">
                <el-form-item
wangna committed
181
                  label="币种"
wangguangchao committed
182 183 184 185 186 187
                  prop="infcon.seacur"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.infcon.seacur"
                    style="width: 100%"
wangna committed
188
                    placeholder="请选择币种"
wangyanjiao committed
189
                    :code="codes.curtxt1"
wangguangchao committed
190 191 192 193 194 195
                  >
                  </c-select>
                </el-form-item>
              </c-col>
              <c-col :span="8">
                <el-form-item
wangna committed
196
                  label="金额区间"
wangguangchao committed
197 198 199 200 201 202 203
                  prop="infcon.seaamtfr"
                  style="width: 100%"
                >
                  <c-col :span="11">
                    <c-input
                      v-model="model.infcon.seaamtfr"
                      style="width: 100%"
wangna committed
204
                      placeholder="请输入金额下限"
wangguangchao committed
205 206 207 208 209 210 211 212 213 214
                    >
                    </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"
                      style="width: 100%"
wangna committed
215
                      placeholder="请输入金额上限"
wangguangchao committed
216 217 218 219 220 221
                    >
                    </c-input>
                  </c-col>
                </el-form-item>
              </c-col>
            </c-col>
潘际乾 committed
222
            <c-col :span="24">
wangguangchao committed
223 224
              <c-col :span="8">
                <el-form-item
wangna committed
225
                  label="保兑指示"
wangguangchao committed
226 227 228 229 230 231
                  prop="seacnfdet"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.seacnfdet"
                    style="width: 100%"
wangna committed
232
                    placeholder="请选择保兑指示"
wangyanjiao committed
233
                    :code="codes.cnfins"
wangguangchao committed
234 235 236 237 238 239 240
                  >
                  </c-select>
                </el-form-item>
              </c-col>

              <c-col :span="8">
                <el-form-item
wangna committed
241
                  label="信用证类型"
wangguangchao committed
242 243 244 245 246 247
                  prop="sealcrtyp"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.sealcrtyp"
                    style="width: 100%"
wangna committed
248
                    placeholder="请选择信用证类型"
wangyanjiao committed
249
                    :code="codes.lcrtyp"
wangguangchao committed
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
                  >
                  </c-select>
                </el-form-item>
              </c-col>

              <c-col :span="8">
                <el-form-item
                  label="假远期信用证"
                  prop="jyqflg"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.jyqflg"
                    style="width: 100%"
                    placeholder="请选择假远期信用证"
wangyanjiao committed
265
                    :code="codes.jyqflg"
wangguangchao committed
266 267 268 269 270
                  >
                  </c-select>
                </el-form-item>
              </c-col>
            </c-col>
潘际乾 committed
271
            <c-col :span="24">
wangguangchao committed
272 273 274 275 276 277
              <c-col :span="8">
                <el-form-item label="贸易类型" prop="mylx" style="width: 100%">
                  <c-select
                    v-model="model.mylx"
                    style="width: 100%"
                    placeholder="请选择贸易类型"
wangyanjiao committed
278
                    :code="codes.mylx"
wangguangchao committed
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
                  >
                  </c-select>
                </el-form-item>
              </c-col>

              <c-col :span="8">
                <el-form-item
                  label="是否通过电证系统"
                  prop="elcflg"
                  style="width: 100%"
                >
                  <c-select
                    v-model="model.elcflg"
                    style="width: 100%"
                    placeholder="请选择是否通过电证系统"
wangyanjiao committed
294
                    :code="codes.elcflg"
wangguangchao committed
295 296 297 298 299 300 301 302 303 304
                  >
                  </c-select>
                </el-form-item>
              </c-col>
            </c-col>
          </el-row>
        </el-form>
      </template>
    </c-list-search>

305
    <c-col :span="24" style="margin-top: 10px">
306
      <c-button class="medium_bcs" size="medium" style="margin-left: 0px" type="primary" @click="toDitopn">信用证开立</c-button>
307
    </c-col>
liushikai committed
308

309
    <!-- <el-row> -->
liushikai committed
310
      <c-col :span="24">
311
        <c-istream-table :list="stmData.data" :columns="stmData.columns" :showButtonFlg="true">
312
          <el-table-column fixed="right" prop="op" label="操作" width="140px">
313
            <template slot="header">
314
              <c-col :span="11" style="text-align: center"
315 316
                ><span>操作</span></c-col
              >
317
              <!-- <c-col :span="12" style="text-align: right"
318
                ><c-button icon="el-icon-s-tools"></c-button
319
              ></c-col> -->
liushikai committed
320
            </template>
321
            <template slot-scope="scope">
322 323 324 325 326
              <el-popover
                placement="top-start"
                title="历史信息"
                width="800"
                trigger="click"
327
                :ref="'popover_' + scope.row.IDX"
328
              >
329 330 331
              <div style="text-align: right; margin-top: -30px; margin-right: 5px; font-size: 16px;">
               <span class="el-icon-close" @click="closeTrn('popover_' + scope.row.IDX)"/>
              </div>
332 333 334 335
                <c-istream-table
                  :list="trnData.data"
                  :columns="trnData.columns"
                >
336
                  <el-table-column prop="op" label="操作" width="0">
337 338 339 340
                    <template slot-scope="scope">
                      <c-button
                        style="margin-left: 0"
                        size="small"
341
                        @click="display(scope.row['INR'])"
342
                      >
343
                        详情
344 345 346 347 348 349 350 351 352 353 354 355
                      </c-button>
                    </template>
                  </el-table-column>
                </c-istream-table>
                <c-button
                  style="margin-left: 0"
                  size="small"
                  @click="getTrnInfo(scope.$index, scope.row)"
                  slot="reference"
                >
                  详情
                </c-button>
wangna committed
356
                
357
              </el-popover>
wangguangchao committed
358 359

              <c-button
360
                style="margin-left: 5px"
wangguangchao committed
361 362
                size="small"
                type="primary"
wangna committed
363
                @click="getButtons(scope.row['信用证编号'],scope.row['关闭日期'])"
wangguangchao committed
364 365 366 367 368
              >
                处理
              </c-button>
            </template>
          </el-table-column>
wangguangchao committed
369 370
        </c-istream-table>
      </c-col>
371
    <!-- </el-row> -->
wangguangchao committed
372

liuxin committed
373
        <m-busbtn ref="childs" :ownref="ownref" trnCode="ditsel" :model="ditselModel" @onChoose="onChoose"></m-busbtn>
374
      
wangguangchao committed
375 376 377
  </div>
</template>
<script>
378
import Utils from "~/utils/index";
wangguangchao committed
379
import Api from "~/service/Api";
wangren committed
380
import commonProcess from "~/mixin/commonProcess";
wangguangchao committed
381 382
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infdid/Event";
383 384 385

import DitselModel from "~/model/Ditsel"
import BusNavbar from "~/views/Public/BusNavbar";
wangguangchao committed
386 387 388 389

export default {
  inject: ["root"],
  props: ["model", "codes"],
wangren committed
390
  mixins: [commonProcess],
391
  components: { "m-busbtn": BusNavbar },
wangguangchao committed
392 393
  data() {
    return {
394
      ditselModel: new DitselModel().data,
395 396 397 398 399
      ownref: "",
      initdialog: false,
      dialogTableVisible: false,
      trnData: {
        columns: [
400
          '1 1 "编号" 200',
liushikai committed
401 402 403 404
          '2 2 "交易名称" 120',
          // '3 3 "日期" 200',
          {index:3,position:3,width:110,pattern:'date',label:'日期'},
          // '4 4 "状态" 50',
405
          {index:4,position:4,width:100,pattern:'code',label:'状态',code:"relstaEN"},
406
          '5 5 "币种" 80',
liushikai committed
407
          '6 6 "金额" 110',
408 409 410 411
        ],
        data: [],
      },
      stmData: {
wangguangchao committed
412
        columns: [
wangna committed
413 414 415 416 417 418 419 420
          '1 1 "信用证编号" 120',
          '2 2 "客户经理" 100',
          '3 3 "远期期限" 100',
          '7 4 "第一当事人编号" 160',
          '8 5 "申请人名称" 120',
          '9 6 "第二当事人编号" 170',
          '10 7 "受益人名称" 150',
          '11 8 "通知银行BIC编码" 150',
421
//          '4 9 "Opened" 150',
wangna committed
422
          {index:4,position:9,width:100,pattern:'date',label:'开立日期'},
423
//          '5 10 "Expired" 150',
wangna committed
424 425 426 427 428 429
          {index:5,position:10,width:100,pattern:'date',label:'到期日'},
          '6 11 "关闭日期" 100',
          '12 12 "名义币种" 100',
          '13 13 "名义金额" 120',
          '14 14 "余额币种" 125',
          '15 15 "余额" 120',
wangguangchao committed
430 431 432 433 434
        ],
        data: [],
      },
    };
  },
435 436
  methods: { 
    ...Event,
wangna committed
437
        async getButtons(ownref,closedDate){
438
        this.ownref = ownref
wangna committed
439
        this.ditselModel.didget.clsflg = (closedDate ?? "").trim() === "" ? "" : "C";
440
        this.$refs.childs.initdialog = true
441 442 443 444
        console.log("ownref:" +ownref);
      },
        async  onChoose(code){
            //跳转交易
445
          this.$router.history.push("/business/" + code) 
446
          this.$refs.childs.initdialog = false                    
447
        } ,
448 449 450 451 452
        async  getDitSelInfo(code){
            //跳转交易
          this.$router.history.push("/business/" + code) 
          this.$refs.childs.initdialog = false                    
        },
453 454 455 456 457 458 459 460 461 462 463 464 465
    async getTrnInfo(idx, row) {

      this.model.infcon.objinr = row["INR"];
      this.model.didgrp.rec.inr = row["INR"];
      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;
      }
    },
466 467 468
    closeTrn(refId){
       this.$refs[refId].doClose();
    },
469 470
    toDitopn(){
      this.$router.history.push("/business/ditopn") 
wangyanjiao committed
471
    },
472
  },
wangguangchao committed
473 474 475 476
  created: function () {},
};
</script>
<style>
477 478 479
.el-dialog__body {
  padding: 10px 5px 50px;
}
wangguangchao committed
480
</style>