Ovwp1.vue 15.4 KB
Newer Older
1 2 3 4
<template>
  <div class="eibs">
    <!-- 顶部 -->
    <c-col :span="24">
xiameng committed
5
      <c-col :span="12" style="padding-right: 20px;">
6 7 8 9 10 11 12 13 14
        <el-form-item
          label="信用证编号"
          prop="ledgrp.rec.ownref"
          style="width: 100%"
        >
          <c-fullbox>
            <c-input
              v-model="model.ledgrp.rec.ownref"
              maxlength="16"
wangna committed
15
              placeholder="请输入信用证编号"
16 17 18 19 20 21 22 23
              style="width: 95%"
              :disabled="true"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin: 0 10px 0 0; padding: 0 12px"
                size="small"
                type="primary"
xiameng committed
24
                icon="el-icon-info"
25 26
                @click="onSeainf"
              >
xiameng committed
27
              
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
              </c-button>
              <c-button
                style="margin: 0 0"
                size="small"
                type="primary"
                :disabled="
                  model.ledgrp.ben.pts.adrblk && !model.ledgrp.rec.ownref
                    ? false
                    : true
                "
                @click="onLetpButgetref"
              >
                获取
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

xiameng committed
47
      <c-col :span="12" style="padding-left: 20px;">
48 49 50 51
        <el-form-item label="简略信息" prop="ledgrp.rec.nam">
          <c-input
            v-model="model.ledgrp.rec.nam"
            maxlength="40"
wangna committed
52
            placeholder="请输入"
53 54 55 56 57 58 59
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- left -->
xiameng committed
60
    <c-col :span="12" style="padding-right: 20px;">
61 62 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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
      <c-col :span="24">
        <el-form-item label="信用证类型" prop="ledgrp.rec.lcrtyp">
          <c-select
            v-model="model.ledgrp.rec.lcrtyp"
            style="width: 100%"
            placeholder="请选择信用证类型"
            :code="codes.lcrtyp1"
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="19">
          <el-form-item
            label="客户经理"
            prop="letp.usr.extkey"
            style="width: 100%"
          >
            <c-fullbox>
              <c-input
                v-model="model.letp.usr.extkey"
                maxlength="8"
                placeholder="请输入客户经理"
                disabled
              ></c-input>
              <template slot="footer">
                <c-button
                  style="margin-left: 10px; padding: 0 10px"
                  size="small"
                  icon="el-icon-search"
                  type="primary"
                >
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <c-checkbox
            :disabled="true"
            v-model="model.ledgrp.rec.collflg"
            style="margin-left: 10px"
            >担保信用证</c-checkbox
          >
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="信用证金额" prop="ledgrp.cbs.nom1.cur">
            <c-select
              v-model="model.ledgrp.cbs.nom1.cur"
              style="width: 100%"
              placeholder="请选择币种"
              @keyup.enter.native="nom1CurEvent"
              :code="codes.curtxt1"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="7">
          <el-form-item label="" label-width="20px" prop="ledgrp.cbs.nom1.amt">
            <c-input-currency
              v-model="model.ledgrp.cbs.nom1.amt"
              style="text-align: left; width: 100%"
              placeholder="请输入金额"
              @keyup.enter.native="$event.target.blur()"
            ></c-input-currency>
          </el-form-item>
        </c-col>

        <c-col :span="5">
          <c-checkbox
            v-model="model.letp.aamp.aammod.addamtflg"
            style="margin-left: 10px"
            @change="openAddDetails" 
            >附加金额</c-checkbox
          >
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="溢短装" prop="ledgrp.rec.nomtop">
            <c-input
              v-model.number="model.ledgrp.rec.nomtop"
              maxlength="2"
              style="width: 100%"
              placeholder="请输入金额上浮"
              @keyup.enter.native="$event.target.blur()"
              class="m-input-currency"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="7">
          <el-form-item label="" label-width="20px" prop="ledgrp.rec.nomton">
            <c-input
              v-model.number="model.ledgrp.rec.nomton"
              maxlength="2"
              style="width: 100%"
              placeholder="请输入金额下浮"
              @keyup.enter.native="$event.target.blur()"
              class="m-input-currency"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <c-checkbox
            v-model="model.ledgrp.rec.inctrf"
            disabled
            style="margin-left: 10px"
            >Incoming Transfer</c-checkbox
          >
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="19">
          <el-form-item label="金额限额表述" prop="ledgrp.rec.nomspc">
            <c-select
              v-model="model.ledgrp.rec.nomspc"
              style="width: 100%"
              placeholder="请输入金额限额表述"
              :code="codes.nomspc"
              :disabled="true"
            >
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <c-checkbox v-model="resflg" style="margin-left: 10px"
            >保留合同</c-checkbox
          >
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="最大金额" prop="ledgrp.cbs.max.cur">
            <c-select
              v-model="model.ledgrp.cbs.max.cur"
              style="width: 100%"
              placeholder="请选择币种"
              disabled
              :code="codes.curtxt1"
            >
            </c-select>
          </el-form-item>
        </c-col>

        <c-col :span="12">
          <el-form-item label="" label-width="20px" prop="ledgrp.cbs.max.amt">
            <c-input
              v-model="model.ledgrp.cbs.max.amt"
              placeholder="请输入金额"
              class="m-input-currency"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="开证日期" prop="ledgrp.rec.opndat">
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.opndat"
              style="width: 100%"
              placeholder="请选择日期"
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item
            label="预通知日期"
            label-width="130px"
            prop="ledgrp.rec.preadvdt"
          >
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.preadvdt"
              style="width: 100%"
              placeholder="请选择日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="装运日期" prop="ledgrp.rec.shpdat">
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.shpdat"
              style="width: 100%"
              placeholder="请选择日期"
            ></c-date-picker>
          </el-form-item>
        </c-col>

        <c-col :span="12">
          <el-form-item
            label="复核日期"
            label-width="130px"
            prop="ledgrp.rec.advdat"
          >
            <c-date-picker
              type="date"
              v-model="model.ledgrp.rec.advdat"
              style="width: 100%"
              placeholder="请选择日期"
              disabled
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="生效日期" prop="ledgrp.rec.expdat">
          <c-date-picker
            type="date"
            v-model="model.ledgrp.rec.expdat"
            style="width: 100%"
            placeholder="请选择日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="生效地点" prop="ledgrp.rec.expplc">
          <c-input
            v-model="model.ledgrp.rec.expplc"
            maxlength="29"
            placeholder="请选择地点"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="收到的承兑指示"
          prop="ledgrp.rec.cnfdet"
        >
          <c-select
            v-model="model.ledgrp.rec.cnfdet"
            style="width: 100%"
            placeholder="请选择内容"
            :code="codes.cnfflg1"
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="适用规则" prop="ledgrp.rec.apprul">
          <c-select
            v-model="model.ledgrp.rec.apprul"
            style="width: 100%"
            placeholder="请选择适用规则"
            :code="codes.apprul1"
            @change="apprulChange"
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item
          label="其他适用规则"
          prop="ledgrp.rec.apprultxt"
        >
          <c-input
            v-model="model.ledgrp.rec.apprultxt"
            maxlength="35"
            placeholder="请选择适用规则"
            :disabled="model.ledgrp.rec.apprul === 'OTHR' ? false : true"
          ></c-input>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="分批装运" prop="ledgrp.rec.shppar">
          <c-select
            v-model="model.ledgrp.rec.shppar"
            style="width: 100%"
            placeholder="请选择"
            :code="codes.shptrss18"
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="转运" prop="ledgrp.rec.shptrss18">
          <c-select
            v-model="model.ledgrp.rec.shptrss18"
            style="width: 100%"
            placeholder="请选择"
            :code="codes.shptrss18"
          >
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- right -->
xiameng committed
370
    <c-col :span="12" style="padding-left: 20px;">
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
      <c-ptap
        :model="model"
        :argadr="{
          title: '受益人',
          grp: 'ledgrp',
          rol: 'ben',
        }"
        :disabled="true"
        @onSeainf="onSeainf"
        @onAplpDet="onBenpDet"
      >
      </c-ptap>

      <c-ptap
        :model="model"
        :argadr="{
          title: '开证行',
          grp: 'ledgrp',
          rol: 'iss',
        }"
        :disabled="true"
        @onSeainf="onSeainf"
        @onAplpDet="onIsspDet"
      >
      </c-ptap>

      <c-ptap
        :model="model"
        :argadr="{
          title: '申请人',
          grp: 'ledgrp',
          rol: 'apl',
        }"
        :disabled="true"
        @onSeainf="onSeainf"
        @onAplpDet="onAplpDet"
      >
      </c-ptap>

xiameng committed
410 411 412 413
      <c-col :span="12" >
        
        <c-checkbox v-model="model.ledgrp.rec.revflg" class="checkbox-left" style="margin: 0px 0 10px 120px">循环信用证</c-checkbox>
       
414 415 416
      </c-col>

      <!-- Authorization to Debit -->
xiameng committed
417
      <c-col :span="12"  >
wangna committed
418
        <c-checkbox v-model="dbtflg" style="margin: 0px 0 10px 100px">借记授权</c-checkbox>
419 420
      </c-col>

xiameng committed
421 422 423 424
      <c-col :span="12" >
       
        <c-checkbox v-model="nonban" class="checkbox-left" style="margin: 0px 0 10px 120px">非银行开证</c-checkbox>
        
425 426 427
      </c-col>

      <!-- Test Key Unconfirmity -->
xiameng committed
428
      <c-col :span="12">
wangna committed
429
        <c-checkbox v-model="teskeyunc" style="margin: 0px 0 10px 120px">测试密钥不确定</c-checkbox>
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504
      </c-col>
    </c-col>
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Letopn/Event";
import Ptap from "~/views/Public/Ptap";
import Utils from "~/utils";
// import Amtpanl from "~/views/Public/Amtpanl";

export default {
  components: { "c-ptap": Ptap },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {};
  },
  computed: {
    flag() {
      return this.model.mtabut.coninf.usr.extkey == "";
    },
    resflg: {
      get() {
        return this.model.ledgrp.rec.resflg != "";
      },
      set(val) {
        this.model.ledgrp.rec.resflg = val ? "X" : "";
      },
    },
    dbtflg: {
      get() {
        return this.model.ledgrp.rec.dbtflg != "";
      },
      set(val) {
        this.model.ledgrp.rec.dbtflg = val ? "X" : "";
      },
    },
    nonban: {
      get() {
        return this.model.ledgrp.rec.nonban != "";
      },
      set(val) {
        this.model.ledgrp.rec.nonban = val ? "X" : "";
      },
    },
    teskeyunc: {
      get() {
        return this.model.ledgrp.rec.teskeyunc != "";
      },
      set(val) {
        this.model.ledgrp.rec.teskeyunc = val ? "X" : "";
      },
    },
  },
  methods: {
    ...Event,
    nom1CurEvent() {
      this.executeDefault("ledgrp.cbs.nom1.cur").then((res) => {
        if (res.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
    },
    apprulChange(v) {
      if (v !== "OTHR") {
        this.model.ledgrp.rec.apprultxt = "";
      }
    },
    openAddDetails(val){
    if(val ==='' && !( this.model.ledgrp.cbs.max2.amt == '0' && this.model.ledgrp.cbs.opn2.amt == '0'
      &&this.model.ledgrp.blk.addamtcov ==='') ){
wangna committed
505 506 507
        this.$confirm('是否确定要删除此合同的附加金额?','提示',{
            confirmButtonText: '是',
            cancelButtonText: '否',
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
            type: 'warning',
            showClose:false
          }).then(() => {//yes的执行在这里写
            this.executeRule('letp.aamp.aammod.addamtflg').then(res => {
                if (res.respCode == SUCCESS) {
                    this.model.ledgrp.cbs.max2.amt = '0';
                    this.model.ledgrp.cbs.opn2.amt == '0'
                    this.model.ledgrp.blk.addamtcov ='';
                    this.updateModel(res.data)
                }
            })
            // this.model.ledgrp.rec.revtyp ='';
            // this.model.ledgrp.rec.revtimes = '0';
            // this.model.ledgrp.rec.revdat ='';
            // this.model.ledgrp.rec.revcum ='';
            // this.model.ledgrp.blk.revcls ='';
            // this.model.ledgrp.blk.revnotes ='';
            // this.$message({
            //       type: 'success',
            //       message: '删除成功!'
            // });
          }).catch(() => {//No的功能在这里写
            this.model.letp.aamp.aammod.addamtflg ='X'
                // this.$message({
                //   type: 'info',
                //   message: '已取消'
                // });  
          }); 
    }
  }
  },
  created: function () {},
};
</script>
<style>
.marginLable {
  padding-left: 160px;
}
</style>