Opnp1.vue 17.3 KB
Newer Older
1
<template>
LiRui committed
2
  <div class="eibs">
taojinrui committed
3
    <!--=================顶部=================  -->
4

taojinrui committed
5
    <c-col :span="24" style="margin-top: 0">
LiRui committed
6
      <c-col :span="12" style="padding-right: 20px;">
wangna committed
7 8 9 10 11
        <el-form-item
          label="汇款编号"
          prop="cpdgrp.rec.ownref"
          style="width: 100%"
        >
taojinrui committed
12
          <c-fullbox>
wangna committed
13 14 15 16 17 18
            <c-input
              v-model="model.cpdgrp.rec.ownref"
              maxlength="16"
              placeholder="请输入业务编号"
              disabled
            ></c-input>
taojinrui committed
19
            <template slot="footer">
wangna committed
20 21 22 23 24 25
              <c-button
                style="margin: 0px 10px 0 10px; padding: 0 12px"
                size="small"
                type="primary"
                @click="onSeainf"
              >
nanrui committed
26
                <i class="el-icon-info"></i>
taojinrui committed
27
              </c-button>
wangna committed
28 29 30 31 32 33 34
              <c-button
                style="margin: 0 0"
                size="small"
                type="primary"
                :disabled="this.flag"
                @click="onOpnpButgetref"
              >
taojinrui committed
35 36 37 38 39 40
                获取
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>
LiRui committed
41
      <c-col :span="12" style="padding-left: 20px;">
42
        <el-form-item label="简略信息" prop="cpdgrp.rec.nam">
wangna committed
43 44 45 46 47 48
          <c-input
            v-model="model.cpdgrp.rec.nam"
            maxlength="16"
            placeholder=""
            disabled
          ></c-input>
taojinrui committed
49 50 51
        </el-form-item>
      </c-col>
    </c-col>
liushikai committed
52

taojinrui committed
53 54
    <c-col>
      <!-- ===================中部--左==================== -->
LiRui committed
55
      <c-col :span="12" style="padding-right: 20px;">
taojinrui committed
56 57
        <c-col :span="24">
          <el-form-item label="清算编号" prop="cpdgrp.rec.sysno">
wangna committed
58 59 60 61 62
            <c-input
              v-model="model.cpdgrp.rec.sysno"
              maxlength="21"
              placeholder="请输入清算编号"
            ></c-input>
taojinrui committed
63 64
          </el-form-item>
        </c-col>
65

taojinrui committed
66 67
        <c-col :span="24">
          <c-col :span="13">
wangna committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
            <c-form-item
              label="汇款金额"
              previewLabel="汇款金额币种"
              prop="cpdgrp.cbs.nom1.cur"
            >
              <c-select
                v-model="model.cpdgrp.cbs.nom1.cur"
                style="width: 100%"
                placeholder=""
                @change="commonExecuteRule('cpdgrp.cbs.nom1.cur')"
              >
                <el-option
                  v-for="item in codes.currencycode"
                  :key="item.value"
                  :label="item.value + item.label"
                  :value="item.value"
                ></el-option>
taojinrui committed
85 86 87 88
              </c-select>
            </c-form-item>
          </c-col>
          <c-col :span="11">
wangna committed
89 90 91 92 93 94 95 96 97 98
            <c-form-item
              label=""
              previewLabel="汇款金额"
              label-width="8px"
              prop="cpdgrp.cbs.nom1.amt"
            >
              <c-input
                class="m-input-currency"
                v-model="model.cpdgrp.cbs.nom1.amt"
                placeholder="请输入汇款金额"
taojinrui committed
99 100 101 102 103
                @keyup.enter.native="
                  defaultFunction(
                    'cpdgrp.cbs.nom1.amt',
                    model.cpdgrp.cbs.nom1.amt
                  )
wangna committed
104 105
                "
              ></c-input>
taojinrui committed
106 107 108
            </c-form-item>
          </c-col>
        </c-col>
liushikai committed
109

taojinrui committed
110 111 112
        <c-col :span="24">
          <c-col :span="13">
            <el-form-item label="所属行" prop="cpdgrp.rec.othbch">
wangna committed
113 114 115 116 117 118
              <c-input
                v-model="model.cpdgrp.rec.othbch"
                maxlength="8"
                placeholder=""
                disabled
              ></c-input>
taojinrui committed
119 120 121
            </el-form-item>
          </c-col>
          <c-col :span="11">
LiRui committed
122
            <el-form-item label="汇款语种" prop="cptp.payuil">
wangna committed
123 124 125 126 127 128 129 130 131 132 133 134
              <c-select
                v-model="model.cptp.payuil"
                placeholder="请选择汇款语种"
                @change="onPayuilChange"
                style="width: 100%"
              >
                <el-option
                  v-for="item in codes.payuil"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
135
                </el-option>
taojinrui committed
136 137 138 139
              </c-select>
            </el-form-item>
          </c-col>
        </c-col>
liushikai committed
140

taojinrui committed
141 142 143
        <c-col :span="24">
          <c-col :span="13">
            <el-form-item label="是否需要核验" prop="cpdgrp.rec.ischktyp">
wangna committed
144 145 146 147 148 149 150 151 152 153 154
              <c-select
                v-model="model.cpdgrp.rec.ischktyp"
                style="width: 100%"
                placeholder=""
              >
                <el-option
                  v-for="item in codes.ischktyp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
155
                </el-option>
taojinrui committed
156 157 158
              </c-select>
            </el-form-item>
          </c-col>
159

taojinrui committed
160
          <c-col :span="11">
wangna committed
161 162 163 164 165 166 167 168 169 170 171 172
            <el-form-item
              label="预计核验日期"
              prop="cpdgrp.rec.paydat"
            >
              <c-date-picker
                type="date"
                v-model="model.cpdgrp.rec.paydat"
                value-format="yyyy-MM-dd"
                style="width: 100%"
                placeholder=""
                :disabled="this.flag1"
              ></c-date-picker>
taojinrui committed
173 174 175
            </el-form-item>
          </c-col>
        </c-col>
176

taojinrui committed
177
        <c-col :span="24">
LiRui committed
178
          <el-form-item label="我行费用负担" prop="cpdgrp.rec.detchgcod">
wangna committed
179 180 181 182 183 184 185 186 187 188 189
            <c-select
              v-model="model.cpdgrp.rec.detchgcod"
              style="width: 100%"
              placeholder=""
            >
              <el-option
                v-for="item in codes.detchgcod"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
190
              </el-option>
taojinrui committed
191 192 193 194
            </c-select>
          </el-form-item>
        </c-col>
      </c-col>
195

taojinrui committed
196
      <!-- ===================中部--右==================== -->
LiRui committed
197
      <c-col :span="12" style="padding-left: 20px;">
taojinrui committed
198 199 200
        <c-col :span="24">
          <c-col :span="13">
            <el-form-item label="汇款性质" prop="cpdgrp.rec.trntyp">
wangna committed
201 202 203 204 205 206 207 208 209 210 211
              <c-select
                v-model="model.cpdgrp.rec.trntyp"
                placeholder="请选择汇款性质"
                style="width: 100%"
              >
                <el-option
                  v-for="item in trntyp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
taojinrui committed
212 213 214 215
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
wangna committed
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
            <c-form-item
              label="汇款方式"
              prop="cpdgrp.rec.paytype"
            >
              <c-select
                v-model="model.cpdgrp.rec.paytype"
                placeholder="请选择汇款方式"
                style="width: 100%"
              >
                <el-option
                  v-for="item in codes.paytype"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
231
                </el-option>
taojinrui committed
232 233 234 235
              </c-select>
            </c-form-item>
          </c-col>
        </c-col>
236

taojinrui committed
237 238 239
        <c-col :span="24">
          <c-col :span="13">
            <el-form-item label="汇款对象" prop="cpdgrp.rec.gors">
wangna committed
240 241 242 243 244 245 246 247 248 249 250
              <c-select
                v-model="model.cpdgrp.rec.gors"
                placeholder="请选择汇款对象"
                style="width: 100%"
              >
                <el-option
                  v-for="item in codes.gors"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
251
                </el-option>
taojinrui committed
252 253 254 255
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
wangna committed
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
            <c-form-item
              label="收支类型"
              prop="cpdgrp.rec.sztyp"
            >
              <c-select
                v-model="model.cpdgrp.rec.sztyp"
                placeholder="请选择收支类型"
                style="width: 100%"
              >
                <el-option
                  v-for="item in codes.sztyp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
271
                </el-option>
taojinrui committed
272 273 274 275
              </c-select>
            </c-form-item>
          </c-col>
        </c-col>
276

taojinrui committed
277 278 279
        <c-col :span="24">
          <c-col :span="13">
            <el-form-item label="客户类型" prop="cpdgrp.rec.clityp">
wangna committed
280 281 282 283 284 285 286 287 288 289 290
              <c-select
                v-model="model.cpdgrp.rec.clityp"
                placeholder="请选择客户类型"
                style="width: 100%"
              >
                <el-option
                  v-for="item in codes.clityp"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
291
                </el-option>
taojinrui committed
292 293 294 295
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
wangna committed
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
            <c-form-item
              label="报文类型"
              prop="cpdgrp.rec.swftyp"
            >
              <c-select
                style="width: 100%"
                placeholder=""
                v-model="model.cpdgrp.rec.swftyp"
                :disabled="this.flag2"
                @change="swftypChange"
              >
               <el-option
                  v-for="item in this.swftypOpnp"
                  :label="item.label"
                  :value="item.value"
                  :key="item.value"
                >
313
                </el-option>
taojinrui committed
314 315 316 317
              </c-select>
            </c-form-item>
          </c-col>
        </c-col>
318

taojinrui committed
319 320 321 322
        <c-col :span="24">
          <c-fullbox>
            <c-col :span="20">
              <c-col :span="21">
wangna committed
323 324 325 326 327 328 329 330
                <el-form-item
                  label="收款人常驻国家/地区代码"
                  prop="cptp.payeecountcode"
                >
                  <c-input
                    v-model="model.cptp.payeecountcode"
                    maxlength="3"
                    placeholder="请输入收款人常驻国家/地区代码"
taojinrui committed
331 332
                    @keyup.enter.native="
                      showGridPromptDialog('cptp.payeecountcode')
wangna committed
333 334 335
                    "
                    style="width: 100%"
                  ></c-input>
taojinrui committed
336 337 338
                </el-form-item>
              </c-col>
              <c-col :span="3">
wangna committed
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
                <c-button
                  size="small"
                  type="primary"
                  icon="el-icon-search"
                  @click="
                    showGridPromptDialog(
                      'cptp.selbut1',
                      null,
                      null,
                      { TXT: 'cptp.payeecountcode' },
                      { TXT: false },
                      'doxpDialog'
                    )
                  "
                >
taojinrui committed
354 355 356
                </c-button>
              </c-col>
            </c-col>
357

taojinrui committed
358
            <c-col :span="4" style="float: right">
wangna committed
359 360 361
              <c-checkbox v-model="model.cpdgrp.rec.tsnflg" label-width="150px"
                >同名划转</c-checkbox
              >
taojinrui committed
362 363 364
            </c-col>
          </c-fullbox>
        </c-col>
365

taojinrui committed
366
        <c-col :span="24">
LiRui committed
367
          <c-col :span="13">
LiRui committed
368
            <el-form-item label="货物类型" prop="cpdgrp.rec.stagod">
LiRui committed
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
              <c-select
                v-model="model.cpdgrp.rec.stagod"
                style="width: 100%"
                placeholder="请选择货物类型"
              >
                <el-option
                  v-for="item in codes.godcod"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
wangna committed
385 386
            <el-form-item
              label="清算模式"
LiRui committed
387
              prop="cptp.liqtyp"
wangna committed
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
              v-if="model.cpdgrp.cbs.nom1.cur === 'CNY'"
            >
              <c-select
                v-model="model.cptp.liqtyp"
                style="width: 100%"
                placeholder="请选择清算模式"
                :disabled="model.cpdgrp.cbs.nom1.amt === '0.000'"
                :code="this.liqtypOptions"
                @change="swftypChange"
              >
                <el-option
                  v-for="item in liqtypOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
404
                </el-option>
taojinrui committed
405 406
              </c-select>
            </el-form-item>
LiRui committed
407
            <!-- <el-form-item
wangna committed
408 409
              label=""
              v-if="!(model.cpdgrp.cbs.nom1.cur === 'CNY')"
LiRui committed
410
            ></el-form-item> -->
taojinrui committed
411 412 413 414
          </c-col>
        </c-col>
      </c-col>
    </c-col>
415

wangna committed
416 417 418 419 420
    <CptOpnp1Common
      :model="model"
      :codes="codes"
      v-on:onSndpDet="onSndpDet"
    ></CptOpnp1Common>
taojinrui committed
421
  </div>
422 423
</template>
<script>
liushikai committed
424 425
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
wangren committed
426
import commonProcess from "~/mixin/commonProcess";
liushikai committed
427
import Event from "~/model/Cptopn/Event";
liushikai committed
428
import Utils from "~/utils";
liushikai committed
429
import Infpta from "~/views/Business/Infpta";
430

liuxin committed
431
import CptOpnp1Common from "./CptOpnp1Common";
潘际乾 committed
432

433
export default {
taojinrui committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447
  inject: ["root"],
  props: ["model", "codes"],
  components: { Infpta, CptOpnp1Common },
  mixins: [commonProcess],
  data() {
    return {
      trntyp: [
        { value: "0", label: "贸易" },
        { value: "1", label: "非贸易" },
        { value: "2", label: "资本" },
        { value: "3", label: "其他" },
      ],
      liqtypOptions: [
        { value: "C", label: "代理行模式" },
wangna committed
448
        { value: "O", label: "其他" },
taojinrui committed
449 450 451 452 453 454 455 456 457 458 459 460 461 462
        { value: "S", label: "CIPS系统" },
      ],
      swftypOpnp: [
        { label: "MT103", value: "103" },
        { label: "Mt202 COV", value: "202" },
        { label: "MT202", value: "200" },
        { label: "Other", value: "OTH" },
      ],
      flag1: true,
      flag2: true,
    };
  },
  methods: {
    ...Event,
wangna committed
463 464
    onCptpGetref() {},
    onCptpGetmod() {},
taojinrui committed
465 466 467 468 469 470
    commonExecuteRule(ruleName) {
      this.executeRule(ruleName).then((res) => {
        if (res.respCode == SUCCESS) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
471
    },
taojinrui committed
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
  },
  watch: {
    "model.cpdgrp.rec.ischktyp": {
      immediate: true,
      handler(val, oldVal) {
        if (
          this.model.cpdgrp.rec.ischktyp == "N" ||
          this.model.cpdgrp.rec.ischktyp == ""
        ) {
          this.flag1 = true;
          this.model.cpdgrp.rec.paydat = "";
        } else {
          this.flag1 = false;
        }
      },
liushikai committed
487
    },
taojinrui committed
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
    "model.cptp.liqtyp": {
      immediate: true,
      handler(val, oldVal) {
        //清除数据
        if (this.model.cptp.liqtyp != "C") {
          //清除liqtyp = C时填写的数据
          this.model.cptp.cleage = "";
          this.model.cptp.evebch = "";
          this.model.cptp.coract = "";
        } else if (this.model.cptp.liqtyp != "O") {
          this.model.cpdgrp.blk.contag70 = "";
        } else if (this.model.cptp.liqtyp != "S") {
          this.model.cptp.orcnam = "";
          this.model.cptp.orcadr = "";
          this.model.cptp.pyenam = "";
          this.model.cptp.pyeadr = "";
          this.model.cptp.reconebch = "";
          this.model.cptp.reconebchnam = "";
          this.model.cptp.cptp.bustyp = "";
          this.model.cptp.commetr = "";
        }
509

taojinrui committed
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
        if (this.model.cptp.liqtyp == "C") {
          this.model.cpdgrp.rec.swftyp = "103";
          this.swftypOpnp = [
            { label: "MT103", value: "103" },
            { label: "MT202", value: "200" },
          ];
          this.flag2 = false;
        } else if (this.model.cptp.liqtyp == "O") {
          //同步切换报文类型的值
          this.model.cpdgrp.rec.swftyp = "OTH";
          this.flag2 = true;
        } else if (this.model.cptp.liqtyp == "S") {
          this.flag2 = false;
          //同步切换报文类型的值
          this.model.cpdgrp.rec.swftyp = "CIU";
          this.swftypOpnp = [
            { label: "cips111", value: "CIU" },
            { label: "cips112", value: "CIV" },
          ];
        } else {
          //当为空时,恢复下拉选的选项
          this.swftypOpnp = [
            { label: "MT103", value: "103" },
            { label: "Mt202 COV", value: "202" },
            { label: "MT202", value: "200" },
            { label: "Other", value: "OTH" },
          ];
        }
      },
539
    },
taojinrui committed
540 541 542 543 544 545 546 547 548 549 550 551
    "model.cpdgrp.cbs.nom1.amt": {
      immediate: true,
      handler(val, oldVal) {
        if (
          this.model.cpdgrp.cbs.nom1.amt !== "0.000" &&
          this.model.cpdgrp.cbs.nom1.cur != "CNY"
        ) {
          this.flag2 = false;
        } else {
          this.flag2 = true;
        }
      },
552
    },
taojinrui committed
553 554 555 556 557 558 559 560 561 562 563 564 565 566
    "model.cpdgrp.cbs.nom1.cur": {
      immediate: true,
      handler(val, oldVal) {
        if (
          this.model.cpdgrp.cbs.nom1.amt !== "0.000" &&
          this.model.cpdgrp.cbs.nom1.cur != "CNY"
        ) {
          this.flag2 = false;
        } else {
          this.flag2 = true;
        }
      },
    },
  },
wangna committed
567
  created: function () {},
taojinrui committed
568 569 570 571 572 573 574 575
  computed: {
    flag() {
      return (
        this.model.cpdgrp.orc.pts.extkey == ""
        // && this.model.cpdgrp.rec.ownref != ""
      );
    },
  },
liushikai committed
576
};
577
</script>
578
<style scoped>
579
</style>
580