InftrnpsDetail.vue 25.1 KB
Newer Older
liuxin committed
1
<template>
2
<div class="eContainer">
wangna committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  <c-page title="">
    <!-- <div class="eContainer"> -->
    <c-content :height="120">
      <div class="eibs-tab">
        <el-form
          :model="model"
          ref="modelForm"
          tokenKey="modelForm"
          :validate-on-rule-change="false"
          label-width="150px"
          size="small"
        >
          <c-content>
            <!-- <c-col :span="24" style="margin:0 0 5px 0"> -->
            <c-col :span="12" style="height: 24px">
              <el-form-item label="基本信息" class="messageLabel">
              </el-form-item>
            </c-col>
            <c-col :span="11" style="text-align: right">
              <c-button
                size="small"
                type="primary"
                style="margin-left: 0"
                @click="display(model.trn.inr)"
                >交易快照</c-button
              >
              <c-button size="small" type="primary" style="margin-left: 0"
                >智能提示</c-button
              >
              <c-button
                size="small"
                @click="exit"
                type="primary"
                style="margin-left: 0"
                >返回</c-button
              >
            </c-col>
            <!-- </c-col> -->
            <c-col :span="24" style="height: 10px; margin-bottom: 10px">
              <el-divider></el-divider>
            </c-col>
liuxin committed
44

wangna committed
45
            <!-- -------------------基础信息------------------- -->
liuxin committed
46

nanrui committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
                        <!-- ========================= Left ========================= -->
                        <c-col :span="11"> 
                            <c-col :span="24">
                                <c-col :span="22">
                                    <el-form-item label="业务编号">
                                        <c-input  v-model="model.trn.ownref" maxlength="16" disabled  placeholder="请输入业务编号"></c-input>
                                    </el-form-item>
                                </c-col>             
                                <c-col :span="2" style="text-align: right">
                                    <c-button
                                        style="margin:0;padding: 0 14px;"
                                        size="small"
                                        type="primary"
                                    >
                                    <i class="el-icon-info" style="font-size:15px"></i>
                                    </c-button>
                                </c-col>
                            </c-col>
liuxin committed
65

nanrui committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
                            <c-col :span="24">
                                <c-col :span="22">
                                    <el-form-item label="交易代码">
                                        <c-input  v-model="model.recpan.atp.cod" maxlength="6" disabled placeholder="请输入交易代码"></c-input>
                                    </el-form-item>
                                </c-col> 
                                <c-col :span="2" style="text-align: right">
                                    <c-button
                                        style="margin:0;padding: 0 14px;"
                                        size="small"
                                        type="primary"
                                    >
                                    <i class="el-icon-info" style="font-size:15px"></i>
                                    </c-button>
                                </c-col>
                            </c-col>
liuxin committed
82

wangna committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
              <c-col :span="24">
                <c-col :span="13">
                  <el-form-item label="相关金额">
                    <c-input
                      v-model="model.trn.reloricur"
                      maxlength="3"
                      disabled
                      placeholder="请输入"
                    ></c-input>
                  </el-form-item>
                </c-col>
                <c-col :span="11">
                  <el-form-item label="" label-width="8px">
                    <c-input
                      v-model="model.trn.reloriamt"
                      disabled
                      placeholder="请输入"
                    ></c-input>
                  </el-form-item>
                </c-col>
              </c-col>
liuxin committed
104

wangna committed
105 106 107 108 109 110 111 112 113 114 115
              <c-col :span="24">
                <c-col :span="13">
                  <el-form-item label="经办柜员">
                    <c-input
                      v-model="model.trn.usr"
                      maxlength="8"
                      disabled
                      placeholder="请输入经办柜员"
                    ></c-input>
                  </el-form-item>
                </c-col>
liuxin committed
116

wangna committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
                <c-col :span="11">
                  <el-form-item label-width="40%" label="责任小组">
                    <!-- <c-input  v-model="model.trn.usg" maxlength="6" disabled  placeholder="请输入责任小组"></c-input> -->
                    <el-select
                      v-model="model.trn.usg"
                      style="width: 100%"
                      disabled
                    >
                      <el-option
                        v-for="item in codes.usgtxt"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      />
                    </el-select>
                  </el-form-item>
                </c-col>
              </c-col>
liuxin committed
135

wangna committed
136 137 138 139 140 141 142 143 144 145 146
              <c-col :span="24">
                <c-col :span="24">
                  <el-form-item label="根据识别号">
                    <c-input
                      v-model="model.trn.cortrninr"
                      maxlength="8"
                      disabled
                      placeholder="请输入根据识别号"
                    ></c-input>
                  </el-form-item>
                </c-col>
147

wangna committed
148 149 150 151 152 153 154 155 156 157 158 159
                <c-col :span="24">
                  <el-form-item label="执行日期">
                    <c-date-picker
                      type="date"
                      v-model="model.trn.exedat"
                      style="width: 100%"
                      disabled
                      placeholder="请选择执行日期"
                    ></c-date-picker>
                  </el-form-item>
                </c-col>
              </c-col>
liuxin committed
160

wangna committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
              <c-col :span="24">
                <c-col :span="22">
                  <el-form-item label="信息文本">
                    <c-input
                      type="textarea"
                      v-model="model.trn.inftxt"
                      maxlength="65"
                      :rows="3"
                      show-word-limit
                      placeholder="请输入信息文本"
                    ></c-input>
                  </el-form-item>
                </c-col>
                <c-col :span="2" style="text-align: right">
                  <c-button
                    style="margin: 0; padding: 0 12px"
                    size="small"
                    icon="el-icon-search"
                    type="primary"
                  ></c-button>
                </c-col>
              </c-col>
            </c-col>
184

nanrui committed
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
                        <!-- ========================= Right ========================= -->
                        <c-col :span="11" :offset="1">
                            <c-col :span="24">
                                    <c-col :span="22">
                                <el-form-item label="TRN主键">
                                        <c-input  v-model="model.trn.inr" disabled placeholder="请输入TRN主键"></c-input>
                                </el-form-item>
                                    </c-col>
                                    <c-col :span="2" style="text-align: right">
                                        <c-button
                                            style="margin:0;padding: 0 14px;"
                                            size="small"
                                            type="primary"
                                        >
                                        <i class="el-icon-info" style="font-size:15px"></i>
                                        </c-button>
                                    </c-col>
                            </c-col>
203

wangna committed
204 205 206 207 208 209 210 211 212 213
              <c-col :span="24">
                <el-form-item label="交易代码">
                  <c-input
                    v-model="this.atptxt"
                    maxlength="6"
                    disabled
                    placeholder="请输入交易代码"
                  ></c-input>
                </el-form-item>
              </c-col>
214

wangna committed
215
              <c-col :span="24">
216
                <el-form-item label="摘要信息">
wangna committed
217 218 219 220 221 222 223 224
                  <c-input
                    v-model="model.trn.objnam"
                    maxlength="40"
                    disabled
                    placeholder="请输入"
                  ></c-input>
                </el-form-item>
              </c-col>
liuxin committed
225

wangna committed
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
              <c-col :span="24">
                <el-form-item label="发布状态">
                  <el-select
                    v-model="model.trn.relflg"
                    style="width: 100%"
                    disabled
                  >
                    <el-option
                      v-for="item in codes.relstaEN"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </c-col>
liuxin committed
242

wangna committed
243 244 245 246 247 248 249 250 251 252 253
              <c-col :span="24">
                <c-col :span="24">
                  <el-form-item label="经办柜员">
                    <c-input
                      v-model="model.recpan.cretrs.usr"
                      maxlength="8"
                      disabled
                      placeholder="请输入经办人"
                    ></c-input>
                  </el-form-item>
                </c-col>
liuxin committed
254

wangna committed
255 256 257 258 259 260 261 262 263 264
                <c-col :span="24">
                  <el-form-item label="时间戳">
                    <c-input
                      v-model="model.recpan.cretrs.dattim"
                      disabled
                      placeholder="请输入时间戳"
                    ></c-input>
                  </el-form-item>
                </c-col>
              </c-col>
liuxin committed
265

wangna committed
266 267 268 269 270 271 272 273 274 275 276 277
              <c-col :span="24">
                <el-form-item label="信息标志">
                  <el-select v-model="model.trn.infdsp" style="width: 100%">
                    <el-option
                      v-for="item in codes.infdsp"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </el-form-item>
              </c-col>
nanrui committed
278

wangna committed
279 280 281 282 283 284 285 286 287 288 289 290
              <c-col :span="24">
                <el-form-item label="发送退回至">
                  <c-input
                    v-model="model.recpan.usr.extkey"
                    disabled
                    style="width: 100%"
                    placeholder=""
                  >
                  </c-input>
                </el-form-item>
              </c-col>
            </c-col>
nanrui committed
291

wangna committed
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 370 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 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 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
            <!-- -------------------document------------------- -->
            <c-col :span="24" style="height: 24px">
              <el-form-item label="面函/报文" class="messageLabel">
              </el-form-item>
            </c-col>
            <c-col :span="24" style="height: 0px; margin-top: -5px">
              <el-divider></el-divider>
            </c-col>
            <c-col :span="24">
              <c-istream-table
                :list="documentsData.data"
                :columns="documentsData.columns"
              >
                <el-table-column label="介质" width="110px">
                  <template slot-scope="scope">
                    <el-form-item
                      label-width="0"
                      :prop="'trnmod.trndoc.doceot.' + scope.$index + '.cortyp'"
                    >
                      <c-select
                        v-model="scope.row.cortyp"
                        style="width: 100%"
                        disabled
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in codes.doceotCortyp"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </c-select>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column label="报文格式" width="150px">
                  <template slot-scope="scope">
                    <c-select
                      v-model="scope.row.docsnf"
                      style="width: 100%"
                      placeholder="请选择"
                      @change="executeDefault('trnmod.trndoc.doccur.docsnf')"
                    >
                      <el-option
                        v-for="item in codes.docsnf"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      >
                      </el-option>
                    </c-select>
                  </template>
                </el-table-column>
                <el-table-column label="语言" width="150px">
                  <template slot-scope="scope">
                    <c-select
                      v-model="scope.row.docuil"
                      style="width: 100%"
                      placeholder="请选择"
                    >
                      <el-option
                        v-for="item in codes.uiltxt"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                      >
                      </el-option>
                    </c-select>
                  </template>
                </el-table-column>
                <el-table-column label="传送方式" width="110px">
                  <template slot-scope="scope">
                    <el-form-item
                      label-width="0"
                      :prop="'trnmod.trndoc.doceot.' + scope.$index + '.apf'"
                    >
                      <c-select
                        v-model="scope.row.apf"
                        disabled
                        style="width: 100%"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in codes.apftxt"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </c-select>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column label="发送份数" width="70">
                  <template slot-scope="scope">
                    <c-input
                      v-model="scope.row.apfcpy1"
                      :readonly="true"
                      style="width: 100%"
                      placeholder="请选择"
                    >
                    </c-input>
                  </template>
                </el-table-column>
                <el-table-column label="抄送份数" width="70">
                  <template slot-scope="scope">
                    <c-input
                      v-model="scope.row.apfcpy2"
                      style="width: 100%"
                      placeholder="请选择"
                    >
                    </c-input>
                  </template>
                </el-table-column>
                <el-table-column label="" width="110px">
                  <template slot-scope="scope">
                    <el-form-item
                      label-width="0"
                      :prop="'trnmod.trndoc.doceot.' + scope.$index + '.staflg'"
                    >
                      <c-select
                        v-model="scope.row.staflg"
                        style="width: 100%"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="item in codes.swttlx"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                        </el-option>
                      </c-select>
                    </el-form-item>
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="200px" fixed="right">
                  <template slot-scope="scope">
                    <c-button
                      type="primary"
                      size="small"
                      :disabled="
                        (scope.row.pandsc == 'MT799' &&
                          model.didgrp &&
                          model.didgrp.rec &&
                          model.didgrp.rec.elcflg == 'Y') ||
                        suppress
                      "
                      @click="show(scope.$index, scope.row)"
                      style="margin-right: 10px"
                      >预览</c-button
                    >
                    <c-button
                      size="small"
                      type="primary"
                      style="margin-left: 0"
                      @click="handleDetail(scope.row.index, scope.row)"
                      >详情</c-button
                    >
                  </template>
                </el-table-column>
              </c-istream-table>
            </c-col>
456

wangna committed
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
            <c-col :span="24" style="height: 24px; margin-top: 20px">
              <el-form-item label="经办/复核" class="messageLabel">
              </el-form-item>
            </c-col>
            <c-col :span="24" style="height: 0px; margin-top: -5px">
              <el-divider></el-divider>
            </c-col>
            <c-col :span="24">
              <!-- <c-input  v-model="model.recpan.trsstm"  placeholder="请输入Signatures"></c-input> -->
              <c-col :span="24" :offset="0">
                <c-istream-table
                  :list="SignaturesData.data"
                  :columns="SignaturesData.columns"
                  :paginationShow="false"
                  style="width: 100%"
                >
473
                  <el-table-column label="行为" width="auto">
wangna committed
474 475 476 477 478 479 480
                    <template slot-scope="scope">
                      <span>{{ flg[scope.row.IDX] }}</span>
                    </template>
                  </el-table-column>
                </c-istream-table>
              </c-col>
            </c-col>
liuxin committed
481

wangna committed
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
            <!-- -------------------workflow------------------- -->
            <c-col :span="24" style="height: 24px; margin-top: 20px">
              <el-form-item label="工作流服务" class="messageLabel">
              </el-form-item>
            </c-col>
            <c-col :span="24" style="height: 0px; margin-top: -5px">
              <el-divider></el-divider>
            </c-col>
            <c-col :span="24">
              <c-col :span="24" :offset="0">
                <c-istream-table
                  :list="stmData.data"
                  :columns="stmData.columns"
                  :paginationShow="false"
                  style="width: 100%"
                >
                </c-istream-table>
              </c-col>
            </c-col>
          </c-content>
        </el-form>
      </div>
      <!-- </div> -->
    </c-content>
  </c-page>
507
  </div>
liuxin committed
508 509 510
</template>

<script>
潘际乾 committed
511
import Trnrel from "~/model/Trnrel";
wangna committed
512
import Api from "~/service/Api";
wangren committed
513
import commonProcess from "~/mixin/commonProcess";
wangna committed
514 515 516
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Trnrel/Event";
import DocUtils from "~/utils/DocUtils";
liuxin committed
517 518

export default {
wangna committed
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 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653
  name: "InftrnpsDetail",
  mixins: [commonProcess],
  data() {
    return {
      model: new Trnrel().data,
      documentsData: {
        columns: [
          // "1 1 \"类型\" 300 1 0:0 1 CORTYP",
          // "2 2 \"外部密钥\" 300",
          // "3 3 \"文档\" auto",
          '1 4 "收报人" 90',
          '2 5 "描述" 200',
        ],
        data: [],
      },
      SignaturesData: {
        columns: [
          '1 2:1 "用户" 300',
          // '2 3:1 "Date / Time" 300',
          {
            index: 2,
            position: 3,
            width: 300,
            pattern: "time",
            label: "日期/时间",
          },
          // '3 5:1 "Action" 400',
          '4 1:1 "类型" 300',
        ],
        data: [],
      },
      codes: {
        infdsp: CodeTable.infdsp,
        flg: CodeTable.flg,
        atptxt: CodeTable.atptxt,
        relstaEN: CodeTable.relstaEN,
        usgtxt: CodeTable.usgtxt,
        wfetrssta: CodeTable.wfetrssta,
      },
      stmData: {
        columns: [
          '1 1 "编号" 100',
          '2 2 "服务" 100',
          // '3 3 "交易状态" 100',
          {
            index: 3,
            position: 3,
            width: 100,
            pattern: "code",
            label: "交易状态",
            code: CodeTable.wfetrssta,
          },
          '4 4 "最新更新" 120',
          '5 5 "重试" 100',
          '6 6 "文本" 200',
          '7 7 "相反文本" 200',
          // '8 8 "Target Time" auto'
          {
            index: 8,
            position: 8,
            width: "auto",
            pattern: "dateFormat",
            label: "目标时间",
          },
        ],
        data: [],
      },
      flg: [],
      atptxt: "",
      relstaEN: "",
      usgtxt: "",
    };
  },
  mounted() {
    this.loadData();
  },
  methods: {
    ...Event,
    async handleDetail(index, row) {
      const params = {
        index: row.idx,
      };
      let rtnmsg = await Api.post(
        `${this.requestPrefix}/executeDocpanDetail`,
        this.wrapper(params)
      );
      if (rtnmsg.respCode == SUCCESS) {
        this.title = row.pandsc;
        (this.centerDialogVisible = true), this.updateModel(rtnmsg.data);
        this.dialog = this.model.trnmod.trndoc.doceot[row.idx];
        this.index = row.idx;
      }
    },
    loadData() {
      // const { data } = this.$route.query
      this.model = JSON.parse(sessionStorage.getItem("InftrnpsDetail"));
      this.documentsData.data = this.model.recpan.smhstm.rows;
      this.SignaturesData.data = this.model.recpan.trsstm.rows;
      this.stmData.data = this.model.recpan.wfestm.rows;
      this.flg = this.ArrCalCode(this.SignaturesData.data, this.codes.flg, 3);
      this.atptxt = this.strCalCode(
        this.model.recpan.atp.cod,
        this.codes.atptxt
      );
      this.relstaEN = this.strCalCode(
        this.model.trn.relflg,
        this.codes.relstaEN
      );
      this.usgtxt = this.strCalCode(this.model.trn.usg, this.codes.usgtxt);
    },
    strCalCode(str, code) {
      var result = "";
      for (let i = 0; i < code.length; i++) {
        if (code[i].value === code) {
          result = code[i].label;
          continue;
        }
      }
      if (result === "") {
        return str;
      } else {
        return result;
      }
    },
    ArrCalCode(table, code, index) {
      var result = [];
      for (let i = 0; i < table.length; i++) {
        const d = table[i];
        const items = d.split("\t");
        result[i] = items[index];
        for (let j = 0; j < code.length; j++) {
          if (code[j].value === result[i]) {
            result[i] = code[j].label;
            continue;
          }
liuxin committed
654
        }
wangna committed
655 656
      }
      return result;
liuxin committed
657
    },
wangna committed
658 659 660
    exit() {
      this.$store.dispatch("TagsView/delView", this.$route);
      this.$router.history.push("/taskList");
liuxin committed
661
    },
wangna committed
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
    async show(idx, row) {
      var params = {
        selDst: "recpan.smhstm",
        selIds: [idx + 1],
        selBtnId: "A",
      };
      let rtnmsg = await Api.post(
        `/business/trnrel/executeRule/recpan.smhstm`,
        this.wrapper(params)
      );
      if (rtnmsg.respCode == SUCCESS) {
        this.title = "面函";
        let viewurl = "/#/docpan/show";
        let XMLdata;
        if (row.类型 == "LET") {
          window.sessionStorage.docTXT = "";
          window.sessionStorage.docXML = rtnmsg.data.docimm_xmldocblk;
        } else if (row.pandsc == "MT799") {
          window.sessionStorage.docTXT = "";
          XMLdata = rtnmsg.data.litbenl1blk;
hulei committed
682
        }
wangna committed
683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698
        window.open(
          viewurl,
          "newwindow",
          "height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no"
        );
      } else {
        const h = this.$createElement;
        const msg = rtnmsg.respMsg || "请求执行失败!";
        this.$notify.error({
          title: "错误",
          message: h("p", { style: "word-break:break-all;" }, msg),
        });
      }
    },
  },
};
liuxin committed
699
</script>
liuxin committed
700 701
<style scoped>
.el-col >>> .el-divider--horizontal {
wangna committed
702
  margin-top: 10px;
liuxin committed
703
}
wangna committed
704 705 706
.formItemLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
liuxin committed
707
}
liuxin committed
708 709 710
.el-col >>> .el-divider--horizontal {
  margin-top: 5px;
}
wangna committed
711 712 713
.messageLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
714 715 716
  font-size: 15px;
  color:#1561E0;
  width: auto!important;
liuxin committed
717
}
liuxin committed
718
</style>