Bctsus.vue 16.6 KB
Newer Older
chenwen committed
1 2
<template>
  <div class="eibs-tab">
wangren committed
3 4
    <!-- ====================左边======================= -->
    <c-col :span="11">
5
      <c-col :span="24">
chenwen committed
6
        <el-form-item label="Collection Number" prop="bcdgrp.rec.ownref">
wangren committed
7 8 9 10 11 12
          <c-input
            disabled
            v-model="model.bcdgrp.rec.ownref"
            maxlength="16"
            placeholder="请输入Collection Number"
          ></c-input>
chenwen committed
13
        </el-form-item>
wangren committed
14 15
      </c-col>
      <c-col :span="12">
chenwen committed
16
        <el-form-item label="Document Amount" prop="bcdgrp.cbs.max.cur">
wangren committed
17 18 19 20 21 22 23
          <c-select
            disabled
            v-model="model.bcdgrp.cbs.max.cur"
            style="width: 100%"
            placeholder="请选择Document Amount"
          >
          </c-select>
chenwen committed
24
        </el-form-item>
wangren committed
25 26 27
      </c-col>

      <c-col :span="12">
chenwen committed
28
        <el-form-item label-width="0" prop="bcdgrp.cbs.max.amt">
wangren committed
29 30 31 32 33
          <c-input
            disabled
            v-model="model.bcdgrp.cbs.max.amt"
            placeholder="请输入Document Amount"
          ></c-input>
chenwen committed
34
        </el-form-item>
wangren committed
35
      </c-col>
chenwen committed
36

wangren committed
37
      <c-col :span="12">
chenwen committed
38
        <el-form-item label="Open Amount" prop="bcdgrp.cbs.opn1.cur">
wangren committed
39 40 41 42 43 44 45
          <c-select
            disabled
            v-model="model.bcdgrp.cbs.opn1.cur"
            style="width: 100%"
            placeholder="请选择Open Amount"
          >
          </c-select>
chenwen committed
46
        </el-form-item>
wangren committed
47 48
      </c-col>
      <c-col :span="12">
chenwen committed
49
        <el-form-item label-width="0" prop="bcdgrp.cbs.opn1.amt">
wangren committed
50 51 52 53 54
          <c-input
            disabled
            v-model="model.bcdgrp.cbs.opn1.amt"
            placeholder="请输入Open Amount"
          ></c-input>
chenwen committed
55
        </el-form-item>
wangren committed
56 57 58
      </c-col>

      <c-col :span="12">
chenwen committed
59
        <el-form-item label="Docs Received on" prop="bcdgrp.rec.rcvdat">
wangren committed
60 61 62 63 64 65 66
          <c-date-picker
            disabled
            type="date"
            v-model="model.bcdgrp.rec.rcvdat"
            style="width: 100%"
            placeholder="请选择Docs Received on"
          ></c-date-picker>
chenwen committed
67
        </el-form-item>
wangren committed
68 69 70
      </c-col>

      <c-col :span="12">
chenwen committed
71
        <el-form-item label="Advice on" prop="bcdgrp.rec.advdat">
wangren committed
72 73 74 75 76 77 78
          <c-date-picker
            disabled
            type="date"
            v-model="model.bcdgrp.rec.advdat"
            style="width: 100%"
            placeholder="请选择Date of Advice of Documents Received"
          ></c-date-picker>
chenwen committed
79
        </el-form-item>
wangren committed
80 81
      </c-col>
      <c-col :span="12">
chenwen committed
82
        <el-form-item label="Maturity Date" prop="bcdgrp.rec.matdat">
wangren committed
83 84 85 86 87 88 89
          <c-date-picker
            type="date"
            disabled
            v-model="model.bcdgrp.rec.matdat"
            style="width: 100%"
            placeholder="请选择Maturity Date"
          ></c-date-picker>
chenwen committed
90
        </el-form-item>
wangren committed
91 92
      </c-col>
      <c-col :span="12">
chenwen committed
93
        <el-form-item label="Remitted on " prop="bcdgrp.rec.predat">
wangren committed
94 95 96 97 98 99 100
          <c-date-picker
            type="date"
            disabled
            v-model="model.bcdgrp.rec.predat"
            style="width: 100%"
            placeholder="请选择Maturity Date"
          ></c-date-picker>
chenwen committed
101
        </el-form-item>
wangren committed
102 103
      </c-col>
      <c-col :span="24">
chenwen committed
104
        <el-form-item label="Payment Condition" prop="bcdgrp.rec.doctypcod">
wangren committed
105 106 107
          <c-select
            :code="codes.doctypcod"
            disabled
108
           
wangren committed
109 110 111 112 113
            v-model="model.bcdgrp.rec.doctypcod"
            style="width: 100%"
            placeholder="请选择Payment Condition"
          >
          </c-select>
chenwen committed
114
        </el-form-item>
wangren committed
115 116
      </c-col>
      <c-col :span="24">
chenwen committed
117
        <el-form-item label="Document Set Status" prop="bcdgrp.rec.docsta">
wangren committed
118 119
          <c-select
            style="width: 100%"
120
            :code="codes.docstabot"
wangren committed
121
            disabled
122
           
wangren committed
123 124 125 126
            v-model="model.bcdgrp.rec.docsta"
            maxlength="1"
            placeholder="请输入Document Set Status"
          ></c-select>
chenwen committed
127
        </el-form-item>
wangren committed
128
      </c-col>
chenwen committed
129

130
      <!-- <c-col :span="24">
chenwen committed
131 132
        <el-form-item label="Tenor Stream" prop="liaall.tenstm">
            <c-input  v-model="model.liaall.tenstm"  placeholder="请输入Tenor Stream"></c-input>
chenwen committed
133
        </el-form-item>
134
       </c-col> -->
wangren committed
135 136
      <c-col :span="22" :offset="1">
        <c-istream-table
wangren committed
137
          ref="table"
wangren committed
138 139 140 141
          :list="model.liaall.tenstm.rows || []"
          :columns="trnData.columns"
          :showSelection="true"
          v-on:multipleSelect="multipleSelect"
wangren committed
142
          prop="liaall.tenstm"
wangren committed
143 144 145
        >
        </c-istream-table>
      </c-col>
146
    <c-col :span="24">
wangren committed
147 148 149 150 151
        <c-docpre
          :model="model"
          :argadr="{
            path: 'bcdgrp.blk.docpre',
            grp: 'bctp',
152
            code: 'docpre',
wangren committed
153 154
          }"></c-docpre>
    </c-col>
155 156
    </c-col>
    
chenwen committed
157

wangren committed
158 159
    <!-- ========================右边======================= -->
    <c-col :span="11" :offset="1">
160 161
      <c-col :span="24">
        <el-form-item label="Name" prop="bcdgrp.rec.nam">
wangren committed
162 163 164 165 166 167
          <c-input
            disabled
            v-model="model.bcdgrp.rec.nam"
            maxlength="40"
            placeholder="请输入Name"
          ></c-input>
168
        </el-form-item>
wangren committed
169 170
      </c-col>
      <c-col :span="24">
chenwen committed
171
        <el-form-item label="Drawee's Ref" prop="bcdgrp.dre.pts.ref">
wangren committed
172 173 174 175 176 177
          <c-input
            disabled
            v-model="model.bcdgrp.dre.pts.ref"
            maxlength="16"
            placeholder="请输入Drawee"
          ></c-input>
chenwen committed
178
        </el-form-item>
wangren committed
179
      </c-col>
chenwen committed
180 181
      <c-col :span="24">
        <el-form-item label="Drawee's Name" prop="bcdgrp.dre.pts.nam">
wangren committed
182 183 184 185 186 187
          <c-input
            disabled
            v-model="model.bcdgrp.dre.pts.nam"
            maxlength="40"
            placeholder="请输入Name of Party"
          ></c-input>
chenwen committed
188
        </el-form-item>
wangren committed
189 190
      </c-col>
      <c-col :span="24">
chenwen committed
191
        <el-form-item label="Remitting Bank's Ref " prop="bcdgrp.rmi.pts.ref">
wangren committed
192 193 194 195 196 197
          <c-input
            disabled
            v-model="model.bcdgrp.rmi.pts.ref"
            maxlength="16"
            placeholder="请输入Remitting Bank"
          ></c-input>
chenwen committed
198
        </el-form-item>
wangren committed
199
      </c-col>
chenwen committed
200 201 202

      <c-col :span="24">
        <el-form-item label="Remitting Bank's Name" prop="bcdgrp.rmi.pts.nam">
wangren committed
203 204 205 206 207 208
          <c-input
            disabled
            v-model="model.bcdgrp.rmi.pts.nam"
            maxlength="40"
            placeholder="请输入Name of Party"
          ></c-input>
chenwen committed
209
        </el-form-item>
wangren committed
210
      </c-col>
chenwen committed
211 212
      <c-col :span="24">
        <el-form-item label="Drawer's Ref " prop="bcdgrp.drr.pts.ref">
wangren committed
213 214 215 216 217 218
          <c-input
            disabled
            v-model="model.bcdgrp.drr.pts.ref"
            maxlength="16"
            placeholder="请输入Drawer"
          ></c-input>
chenwen committed
219 220 221
        </el-form-item>
      </c-col>
      <c-col :span="24">
wangren committed
222 223 224 225 226 227 228
        <el-form-item label="Drawer's Name" prop="bcdgrp.drr.pts.nam">
          <c-input
            disabled
            v-model="model.bcdgrp.drr.pts.nam"
            maxlength="40"
            placeholder="请输入Name of Party"
          ></c-input>
chenwen committed
229
        </el-form-item>
wangren committed
230 231
      </c-col>
      <c-col :span="24" class="bctdav_bctp_bctovw_cheak">
panziyi committed
232
        <c-checkbox v-model="focflg" @change="focflgDefault"
wangren committed
233 234 235 236
          >Free of Payment</c-checkbox
        >
      </c-col>
      <c-col :span="12">
chenwen committed
237
        <el-form-item label="Reduction Amt" prop="setmod.doccur">
wangren committed
238 239 240 241 242 243 244
          <c-select
            disabled
            v-model="model.setmod.doccur"
            style="width: 100%"
            placeholder="请选择document currency"
          >
          </c-select>
chenwen committed
245
        </el-form-item>
wangren committed
246 247 248
      </c-col>

      <c-col :span="12">
panziyi committed
249
        <el-form-item label-width="0" >
wangren committed
250
          <c-input
panziyi committed
251
            :disabled="model.bcdgrp.rec.focflg=='X'"
wangren committed
252 253 254
            v-model="model.setmod.redamt"
            placeholder="请输入Reduction Amt."
          ></c-input>
chenwen committed
255
        </el-form-item>
wangren committed
256 257
      </c-col>

258
      <c-col :span="12" class="bctdav_bctp_bctovw_cheak">
panziyi committed
259
        <c-checkbox :disabled="model.bcdgrp.rec.focflg=='X'" v-model="crefinflg"
panziyi committed
260
        @change="crefinflgChange"
wangren committed
261 262 263 264 265
          >Create Financing</c-checkbox
        >
      </c-col>

      <c-col :span="12" class="bctdav_bctp_bctovw_cheak">
panziyi committed
266
        <c-checkbox v-model="model.dftcre.dfflag" @change="dfflagChange">同业代付</c-checkbox>
wangren committed
267
      </c-col>
268

wangren committed
269
      <c-col :span="24" class="bctdav_bctp_bctovw_cheak">
panziyi committed
270
        <c-checkbox true-label="C" v-model="clsflg" @change="clsflgOtherDefault"
wangren committed
271 272 273
          >Close Contract</c-checkbox
        >
      </c-col>
panziyi committed
274 275 276 277 278 279 280 281 282 283 284
      
<c-col :span="24">
        <el-form-item
          label="跨境人民币清算模式"
          prop="trnmod.cmtflg"
          v-if="model.setmod.doccur == 'CNY'"
          style="margin-top: 15px"  
        >
          <c-select
            v-model="model.trnmod.cmtflg"
            style="width: 100%"
panziyi committed
285
            :disabled="model.bcdgrp.rec.focflg=='X'"
panziyi committed
286
            placeholder=""     
panziyi committed
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
          >
          <el-option
              v-for="item in codes.cmtflg"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              
            ></el-option>
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item
          label="报文类型"
          prop="trnmod.swftyp"
          v-if="model.trnmod.cmtflg =='P'||model.trnmod.cmtflg =='X'"
        >
          <c-select v-model="model.trnmod.swftyp" disabled  placeholder="" 
          :code="codes.swftyp1"
          style="width: 100%"
          >
          </c-select>
        </el-form-item>
      </c-col>
chenwen committed
311
      <c-col :span="12">
312
        <el-form-item label="Settle Amt." prop="setmod.doccur">
wangren committed
313 314 315 316 317
          <c-select
            disabled
            v-model="model.setmod.doccur"
            style="width: 100%"
            placeholder="请选择document currency"
panziyi committed
318
            @change="1"
wangren committed
319 320
          >
          </c-select>
chenwen committed
321
        </el-form-item>
wangren committed
322 323
      </c-col>
      <c-col :span="12">
chenwen committed
324
        <el-form-item label-width="0" prop="setmod.docamt">
wangren committed
325 326 327 328
          <c-input
            v-model="model.setmod.docamt"
            placeholder="请输入document amount"
          ></c-input>
chenwen committed
329
        </el-form-item>
wangren committed
330
      </c-col>
chenwen committed
331
      <c-col :span="24">
332
        <el-form-item label="合同号" prop="bcdgrp.rec.rptref">
wangren committed
333 334 335 336 337 338
          <c-input
            v-model="model.bcdgrp.rec.rptref"
            style="width: 100%"
            placeholder="请输入Contract No."
          >
          </c-input>
chenwen committed
339
        </el-form-item>
wangren committed
340 341
      </c-col>
      <c-col :span="24">
342
        <el-form-item label="发票号" prop="bcdgrp.rec.invref">
wangren committed
343 344 345 346 347 348
          <c-input
            v-model="model.bcdgrp.rec.invref"
            style="width: 100%"
            placeholder="请输入Invoice No."
          >
          </c-input>
chenwen committed
349
        </el-form-item>
wangren committed
350
      </c-col>
351 352
      <c-col :span="12">
        <el-form-item label="是否需要检核" prop="bctp.ischktyp">
wangren committed
353 354 355 356
          <c-select
            v-model="model.bctp.ischktyp"
            style="width: 100%"
            placeholder="请选择document currency"
357
            :code="codes.ischktyp"
wangren committed
358 359
          >
          </c-select>
360
        </el-form-item>
wangren committed
361 362
      </c-col>
      <c-col :span="12">
363
        <el-form-item label="预计核验日期" prop="bctp.prechkdat">
wangren committed
364 365 366 367 368 369 370 371
          <c-date-picker
            :disabled="this.typ1"
            type="date"
            v-model="model.bctp.prechkdat"
            style="width: 100%"
            placeholder="请选择预计核验日期"
          >
          </c-date-picker>
372
        </el-form-item>
wangren committed
373 374
      </c-col>
    </c-col>
chenwen committed
375
  </div>
chenwen committed
376 377
</template>
<script>
wangren committed
378
import Api from "~/service/Api";
wangren committed
379
import commonProcess from "~/mixin/commonProcess";
wangren committed
380 381
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Bctset/Event";
panziyi committed
382
import Utils from "~/utils";
chenwen committed
383

wangren committed
384
import Docpre from "~/views/Public/Docpre";
chenwen committed
385
export default {
panziyi committed
386 387
  components: {
    "c-docpre": Docpre,
wangren committed
388 389 390 391
  },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
panziyi committed
392
 
wangren committed
393 394 395
  data() {
    return {
      typ1: true,
panziyi committed
396
     // flag1: false,
wangren committed
397
      trnData: {
398
        columns: [
wangren committed
399 400 401 402 403
          '1 1 "Type" 60',
          '2 2 "Dbt" 60',
          '3 3 "Cdt" 80',
          '4 4 "Cur" 50',
          '5 5 "Amt" 120 2 8 1 4',
wangren committed
404 405 406 407 408 409 410 411 412 413 414 415
          // '6 6 "Mat.Dat." 120 4 7 1',
          {
            index: 6,
            position: 6,
            width: 250,
            render: (item, scope) => {
              return scope.row[item.prop] === "null"
                ? ""
                : scope.row[item.prop];
            },
            label: "Mat.Dat.",
          },
416 417 418
        ],
        data: [],
      },
wangren committed
419 420
    };
  },
wangren committed
421 422 423
  mounted() {
    this.$nextTick(() => {});
  },
panziyi committed
424 425 426 427
 computed: {
    crefinflg: {
      get() {
        
panziyi committed
428
        if (this.model.bcdgrp.rec.focflg == 'X') {
panziyi committed
429 430 431 432 433 434 435 436 437 438 439 440 441 442
          return false;
        }else{
          return this.model.trtcre.crefinflg != ''
        }
        
      },
      set(val) {
      
        this.model.trtcre.crefinflg = val ? "X" : ""
        
         
        
      }
    },
panziyi committed
443
   clsflg: {
panziyi committed
444 445 446 447 448 449 450
      get() {
        return this.model.mtabut.clsflg=='C'; 
      },
      set(val) {
        this.model.mtabut.clsflg = val ? "C" : "O"
      }
    },
panziyi committed
451
    focflg: {
panziyi committed
452
      get() {
panziyi committed
453
        return this.model.bcdgrp.rec.focflg != ''
panziyi committed
454 455
      },
      set(val) {
panziyi committed
456
        if (this.model.bcdgrp.rec.focflg == 'X' ) {
panziyi committed
457
          this.model.trtcre.crefinflg = ''
panziyi committed
458 459 460
          this.model.trnmod.cmtflg='O'
        }else{
          this.model.trnmod.cmtflg=''
panziyi committed
461
        }
panziyi committed
462
        this.model.bcdgrp.rec.focflg = val ? "X" : ""
panziyi committed
463 464
      }
    },
panziyi committed
465 466 467 468 469 470 471 472
    // dfflag: {
    //   get() {
    //     return this.model.dftcre.dfflag != ''
    //   },
    //   set(val) {
    //     this.model.dftcre.dfflag = val ? "X" : ""
    //   }
    // },
panziyi committed
473
  },
wangren committed
474 475
  methods: {
    ...Event,
476 477 478 479 480 481 482 483

    //   focflgDefault(){
    //   this.executeDefault("trnmod.cmtflg").then((res) => {
    //     if ((res.respCode == SUCCESS)) {
    //       Utils.copyValueFromVO(this.model, res.data);
    //     }
    //   });
    // },
panziyi committed
484
      focflgDefault(){
485
      this.executeDefault("bcdgrp.rec.docsta").then((res) => {
panziyi committed
486 487
        if ((res.respCode == SUCCESS)) {
          Utils.copyValueFromVO(this.model, res.data);
panziyi committed
488
        }
panziyi committed
489
      });
panziyi committed
490
    },
491 492
    

panziyi committed
493 494 495 496 497 498
      crefinflgChange(){
      this.executeRule("trtcre.crefinflg").then((res) => {
        if ((res.respCode == SUCCESS)) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
panziyi committed
499
    },
panziyi committed
500 501 502 503 504 505
     clsflgOtherDefault(){
      this.executeDefault("mtabut.clsflg").then((res) => {
        if ((res.respCode == SUCCESS)) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
panziyi committed
506
    },
panziyi committed
507 508 509 510 511 512
    // async dfflagChange() {
    //   let rtnmsg = await this.executeRule("dftcre.dfflag");
    //   if (rtnmsg.respCode == SUCCESS) {
    //     Utils.copyValueFromVO(this.model, rtnmsg.data);
    //   }
    // },
513 514
    async multipleSelect(selection) {
      console.log(selection);
panziyi committed
515
      if (selection.length > 1) {
wangren committed
516 517 518 519 520 521 522 523
        this.$notify({
          title: "error",
          message: "You cannot select more than one tenor",
          type: "error",
        });
      } else {
        let chkIds;
        if (selection.length === 0) {
panziyi committed
524
          chkIds = [];
wangren committed
525 526 527
          // this.model.liaall.tensetstm.rows = []
          // this.model.liaall.tenstm.rows = []
        } else {
panziyi committed
528
          chkIds = [selection[0] + 1];
wangren committed
529 530 531 532 533
        }
        //
        console.log(this.model.liaall.tensetstm);
        let params = { chkDst: "liaall.tenstm", chkIds };
        const rtnmsg = await this.executeRule("liaall.tenstm", params);
534
        if (rtnmsg.respCode == SUCCESS) {
wangren committed
535 536 537
          this.updateModel(rtnmsg.data);
        } else {
          this.$notify.error({ title: "错误", message: "服务请求失败!" });
chenwen committed
538
        }
539 540
      }
    },
panziyi committed
541
    
wangren committed
542
  },
panziyi committed
543
   watch: {
panziyi committed
544 545 546 547 548 549 550 551
//  "focflg":{
//           immediate: true,
//               handler(val, oldVal) {
//         if(this.model.focflg=="X"){
//         this.model.trnmod.cmtflg="O"
//         }
//        }
//      },
552 553 554 555 556 557 558 559 560 561 562 563 564
  // "bcdgrp.rec.doctypcod":{
  //   immediate: true,         
  //    handler(val, oldVal) {
  //     if(this.bcdgrp.rec.predat!=''){
  //       this.model.bcdgrp.rec.docsta="A"
  //      }else if(this.bcdgrp.rec.opndat!=''){
  //        this.model.bcdgrp.rec.docsta="B"
  //     }
  //     else if(this.model.bcdgrp.rec.doctypcod=="A"||this.model.bcdgrp.rec.doctypcod=="D"||this.model.bcdgrp.rec.doctypcod=="M"){
  //        this.model.bcdgrp.rec.docsta="C"
  //     }
  //  }
  // },
panziyi committed
565 566 567 568 569 570 571 572
        "model.trnmod.cmtflg":{
          immediate: true,
              handler(val, oldVal) {
        if(this.model.trnmod.cmtflg=="P"){
        this.model.trnmod.swftyp="CIV"
        }
       }
     },
panziyi committed
573

panziyi committed
574 575 576 577 578 579 580 581
       "model.bctp.ischktyp": {
      immediate: true,
      handler(val, oldVal) {
        if (this.model.bctp.ischktyp == "Y") {
          this.typ1 = false;
        } else {
          this.typ1 = true;
        }
582
      }
panziyi committed
583
     },
584 585 586 587
   },
  created: function () {
    
  },
wangren committed
588
};
chenwen committed
589 590
</script>
<style>
591 592 593
.bctdav_bctp_bctovw_cheak {
  margin: 0px 0 10px 150px;
}
chenwen committed
594
</style>