Selp.vue 29.1 KB
1 2 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 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 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 505 506 507 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 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
<template>
    <div class="eibs-tab">
        <c-list-search @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>
                        <c-col :span="8">
                            <c-form-item label="业务编号" prop="cfaquep.ownref" style="width: 100%">
                                <c-input v-model="model.cfaquep.ownref" maxlength="30" placeholder="请输入业务编号"></c-input>
                            </c-form-item>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="开立日期" prop="cfaquep.frmdat" style="width: 100%">
                                <c-col :span="11">
                                    <c-date-picker type="date" v-model="model.cfaquep.frmdat" style="width:100%"
                                        placeholder="请选择起始日期" 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>
                                <c-col :span="11">
                                    <c-date-picker type="date" v-model="model.cfaquep.tildat" style="width:100%"
                                        placeholder="请选择截至日期" value-format="yyyy-MM-dd"></c-date-picker>
                                </c-col>
                            </el-form-item>
                        </c-col>
                        <c-col :span="8">
                            <el-form-item label="申报类型" prop="cfaquep.cfatyp" style="width: 100%">
                                <c-select v-model="model.cfaquep.cfatyp" style="width: 100%" placeholder="请选择申报类型"
                                    :code="codes.cfatyp1">
                                </c-select>
                            </el-form-item>
                        </c-col>
                    </el-row>
                    <el-row v-show="searchSlot.searchToggle">
                        <c-col :span="8">
                            <c-form-item label="申报号码" prop="cfaquep.rptno" style="width: 100%">
                                <c-input v-model="model.cfaquep.rptno" maxlength="28" placeholder="请输入申报号码">
                                </c-input>
                            </c-form-item>
                        </c-col>
                        <c-col :span="8">
                            <c-form-item label="查询日期类型" prop="cfaquep.dattyp" style="width: 100%">
                                <c-select v-model="model.cfaquep.dattyp" maxlength="1" style="width: 100%"
                                    placeholder="请选择查询日期类型" :code="codes.dattyp">
                                </c-select>
                            </c-form-item>
                        </c-col>
                        <c-col :span="8">
                            <c-form-item label="笔数" prop="cfaquep.sum" style="width: 100%">
                                <c-input v-model="model.cfaquep.sum" placeholder="请输入笔数" disabled>
                                </c-input>
                            </c-form-item>
                        </c-col>

                        <c-col :span="8">
                            <el-form-item label="业务所属行" prop="cfaquep.ownextkey" style="width: 100%">
                                <c-select v-model="model.cfaquep.ownextkey" style="width:100%" placeholder="请选择业务所属行"
                                    :code="codes.ownextkey4">
                                </c-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="8">
                            <c-form-item label="业务情况" prop="cfaquep.staflg" style="width: 100%">
                                <c-select v-model="model.cfaquep.staflg" maxlength="1" style="width: 100%"
                                    placeholder="请选择业务情况" :code="codes.staflg1">
                                </c-select>
                            </c-form-item>
                        </c-col>
                    </el-row>
                </el-form>
            </template>
        </c-list-search>
        <c-col :span="24" style="">
            <div style="border-bottom: 10px solid rgb(232, 232, 232)">
            </div>
        </c-col>
        <c-col :span="24" style="margin-top: 10px">
            <c-button class="medium_bcs" size="medium" style="margin-left: 0px" type="primary">导出Excel
            </c-button>
            <c-button class="medium_bcs" size="medium" type="primary">新增接口
            </c-button>
            <c-button class="medium_bcs" size="medium" type="primary">代付利息
            </c-button>
            <c-button class="medium_bcs" v-if="model.cfaquep.cfatyp == 'EAD'" size="small" type="primary"
                @click="toEadadd">新增外债海外代付
            </c-button>
            <c-button class="medium_bcs" v-if="model.cfaquep.cfatyp == 'EAF'" size="small" type="primary"
                @click="toEafadd">新增外债远期信用证
            </c-button>
            <c-button class="medium_bcs" v-if="model.cfaquep.cfatyp == 'EBA'" size="small" type="primary"
                @click="toEbaadd">新增对外担保
            </c-button>
            <c-button class="medium_bcs" v-if="model.cfaquep.cfatyp == 'ECA'" size="small" type="primary"
                @click="toEcaadd">新增国内外汇贷款
            </c-button>
        </c-col>

        <div style="height:90%">
            <c-col :span="24">
                <c-istream-table :list="stmData.data" :columns="stmData.columns" :showButtonFlg="true">
                    <!-- 自定义组件里加了最右边的一列”操作“ -->
                    <el-table-column fixed="right" prop="op" label="操作" width="200px">
                        <template slot="header">
                            <c-col :span="11" style="text-align: center"><span>操作</span></c-col>
                        </template>
                        <template slot-scope="scope">
                            <!-- 申请一个弹出主键放在插槽,加工已渲染的数据 -->
                            <c-button style="margin-left: 0" size="small" @click="getInfo(scope.$index, scope.row)">
                                详情
                            </c-button>
                            <c-button style="margin-left: 3px" size="small" @click="getAmend(scope.$index, scope.row)" :disabled="scope.row.状态 == 'D'">
                                修改
                            </c-button>
                            <c-button style="margin-left: 3px" size="small" @click="getDelete(scope.$index, scope.row)" :disabled="scope.row.状态 == 'D'">
                                删除
                            </c-button>
                        </template>
                    </el-table-column>
                </c-istream-table>
            </c-col>
        </div>

        <!-- <c-col :span="12">
            <c-form-item label="Selection" prop="eblstm">
                <c-input v-model="model.eblstm" :placeholder="$t('other.please_enter') + 'Selection'"></c-input>
            </c-form-item>
        </c-col>

        <c-col :span="12">
            <c-form-item label="EAD Selection" prop="eadstm">
                <c-input v-model="model.eadstm" :placeholder="$t('other.please_enter') + 'EAD Selection'"></c-input>
            </c-form-item>
        </c-col>

        <c-col :span="12">
            <c-form-item label="EAF Selection" prop="eafstm">
                <c-input v-model="model.eafstm" :placeholder="$t('other.please_enter') + 'EAF Selection'"></c-input>
            </c-form-item>
        </c-col>

        <c-col :span="12">
            <c-form-item label="EBA Selection" prop="ebastm">
                <c-input v-model="model.ebastm" :placeholder="$t('other.please_enter') + 'EBA Selection'"></c-input>
            </c-form-item>
        </c-col>

        <c-col :span="12">
            <c-form-item label="ECA Selection" prop="ecastm">
                <c-input v-model="model.ecastm" :placeholder="$t('other.please_enter') + 'ECA Selection'"></c-input>
            </c-form-item>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onSerbut">
                {{ $t('cfasel.C0000010') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onDtlbut">
                {{ $t('cfasel.C0000011') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onAddbut">
                {{ $t('cfasel.C0000012') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onAmebut">
                {{ $t('cfasel.C0000013') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" icon="el-icon-delete" @click="onDelbut">
                {{ $t('cfasel.C0000014') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onExpbut">
                {{ $t('cfasel.C0000016') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onAddbut2">
                {{ $t('cfasel.C0000017') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onAmelixi">
                {{ $t('cfasel.C0000019') }}
            </c-button>
        </c-col>

        <c-col :span="12">
            <c-button size="small" type="primary" @click="onExi">
                {{ $t('errcfa.C0000012') }}
            </c-button>
        </c-col> -->
    </div>
</template>
<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Cfasel/Event"
import Utils from "~/utils";

export default {
    inject: ['root'],
    props: ["model", "codes"],
    mixins: [commonProcess],
    data() {
        return {
            stmDataAll: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 150 1 0:0 1 ",
                    "4 4 \"柜员\" 100 1 0:2 1 ",
                    "5 5 \"日期\" 150 4 7:2 1 ",
                    // "6 6 \"申报类型\" 120 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 120 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                ],
                data: [],
            },
            stmDataEad: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 150 1 0:0 1 ",
                    "4 4 \"柜员\" 100 1 0:2 1 ",
                    "5 5 \"日期\" 150 4 7:2 1 ",
                    // "6 6 \"申报类型\" 120 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 120 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                ],
                data: [],
            },
            stmDataEaf: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 120 1 0:0 1 ",
                    "4 4 \"柜员\" 80 1 0:2 1 ",
                    "5 5 \"日期\" 160 4 7:2 1 ",
                    // "6 6 \"申报类型\" 120 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 100 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                    "31 10 \"操作原因\" 150 1 0:0 1 ",
                    "13 11 \"债务人代码\" 120 1 0:2 1 ",
                    // "14 12 \"债务类型\" 100 1 0:2 1 DEBTYP",
                    { index: 14, position: 12, width: 100, pattern: 'code', label: '债务类型', code: this.codes.debtype },
                    "15 13 \"起息日\" 160 4 7:2 1 ",
                    "16 14 \"签约币种\" 100 1 0:2 1 ",
                    "17 15 \"签约金额\" 100 2 8:1 2 4",
                    "18 16 \"到期日\" 160 4 7:2 1 ",
                    "19 17 \"开证申请人代码\" 160 1 0:2 1 ",
                    "20 18 \"开证申请人名称\" 180 1 0:0 1 ",
                    "23 19 \"债权人代码\" 120 1 0:0 1 ",
                    "22 20 \"债权人中文名称\" 180 1 0:0 1 ",
                    "21 21 \"债权人英文名称\" 180 1 0:0 1 ",
                    "24 22 \"债权人类型代码\" 140 1 0:2 1 ",
                    "25 23 \"债权人总部所在国家(地区)代码\" 240 1 0:2 1 ",
                    "26 24 \"债权人经营地所在国家(地区)代码\" 240 1 0:2 1 ",
                    "27 25 \"是否经外汇局特批不需占用指标\" 240 1 0:2 1 ",
                    "38 26 \"银行业务参号\" 130 1 0:0 1 ",
                    "39 27 \"变动编号\" 100 1 0:2 1 ",
                    // "31 28 \"变动类型\" 100 1 0:2 1 CHGTXT",
                    { index: 14, position: 28, width: 100, pattern: 'code', label: '变动类型', code: this.codes.changtype },
                    "29 29 \"变动日期\" 160 4 7:2 1 ",
                    "37 30 \"变动币种\" 100 1 0:2 1 ",
                    "30 31 \"变动金额\" 100 2 8:1 2 4",
                    "35 32 \"公允价值\" 100 2 8:1 2 4",
                    "36 33 \"备注\" 180 1 0:0 1 ",
                    "32 34 \"相关业务类型\" 120 1 0:0 1 ",
                    "33 35 \"是否附有银行承兑汇票\" 180 1 0:0 1 ",
                    // "34 36 \"对方与本机构的关系\" 180 1 0:2 1 EXDTYP",
                    { index: 34, position: 36, width: 180, pattern: 'code', label: '对方与本机构的关系', code: this.codes.exdtyp },
                ],
                data: [],
            },
            stmDataEba: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 120 1 0:0 1 ",
                    "4 4 \"柜员\" 80 1 0:2 1 ",
                    "5 5 \"日期\" 160 4 7:2 1 ",
                    // "6 6 \"申报类型\" 100 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 100 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                    "14 10 \"操作原因\" 130 1 0:0 1 ",
                    "13 11 \"担保人代码\" 120 1 0:2 1 ",
                    "17 12 \"签约日期\" 160 7:2 1 ",
                    "15 13 \"保函金额\" 100 2 8:1 2 4",
                    "16 14 \"保函币种\" 100 1 0:2 1 ",
                    "17 15 \"到期日\" 160 4 7:2 1 ",
                    "18 16 \"担保类型\" 100 1 0:2 1 ",
                    "19 17 \"主债务币种\" 120 1 0:2 1 ",
                    "20 18 \"主债务金额\" 120 2 8:1 2 4",
                    "23 19 \"受益人代码\" 120 1 0:0 1 ",
                    "22 20 \"受益人中文名称\" 150 1 0:0 1 ",
                    "24 21 \"受益人英文名称\" 150 1 0:0 1 ",
                    "24 22 \"受益人类型\" 120 1 0:2 1 ",
                    "25 23 \"受益人国别/地区\" 140 1 0:2 1 ",
                    "27 24 \"被担保人代码\" 120 1 0:0 1 ",
                    "27 25 \"被担保人中文名称\" 150 1 0:0 1 ",
                    "29 26 \"被担保人英文名称\" 150 1 0:0 1 ",
                    "29 27 \"被担保人类型\" 120 1 0:2 1 ",
                    "30 28 \"被担保人国别/地区代码\" 200 1 0:2 1 ",
                    "32 29 \"担保申请人代码\" 140 1 0:0 1 ",
                    "32 30 \"担保申请人中文名称\" 170 1 0:0 1 ",
                    "34 31 \"担保申请人英文名称\" 170 1 0:0 1 ",
                    "37 32 \"核准文件号\" 120 1 0:0 1 ",
                    "35 33 \"担保责任余额变动日期\" 180 4 7:2 1 ",
                    "36 34 \"担保责任余额\" 120 2 8:1 2 4",
                    "38 35 \"履约编号\" 100 1 0:2 1 ",
                    "39 36 \"担保人代码\" 120 1 0:2 1 ",
                    "40 37 \"银行业务参号\" 120 1 0:0 1 ",
                    "41 38 \"履约日期\" 160 4 7:2 1 ",
                    "42 39 \"履约币种\" 100 1 0:2 1 ",
                    "43 40 \"履约金额\" 100 2 8:1 2 4",
                    "44 41 \"购汇履约金额\" 120 2 8:1 2 4",
                    "45 42 \"备注\" 150 1 0:0 1 ",
                ],
                data: [],
            },
            stmDataEca: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 120 1 0:0 1 ",
                    "4 4 \"柜员\" 80 1 0:2 1 ",
                    "5 5 \"日期\" 160 4 7:2 1 ",
                    // "6 6 \"申报类型\" 120 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 100 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                    "13 10 \"操作原因\" 150 1 0:0 1 ",
                    "13 11 \"债权人代码\" 110 1 0:2 1 ",
                    "14 12 \"债务人代码\" 110 1 0:2 1 ",
                    "15 13 \"债务人中文名称\" 180 1 0:0 1 ",
                    "17 14 \"国内外汇贷款类型\" 150 1 0:0 1 DOFTYP",
                    "18 15 \"转贷项目名称\" 180 1 0:0 1 ",
                    "19 16 \"转贷协议号\" 120 1 0:0 1 ",
                    "19 17 \"起息日\" 160 4 7:2 1 ",
                    "20 18 \"到期日\" 160 4 7:2 1 ",
                    "21 19 \"货款币种\" 100 1 0:2 1 ",
                    "22 20 \"签约金额\" 100 2 8:1 2 4",
                    "23 21 \"年化利率值\" 120 2 8:1 2 4",
                    "27 22 \"银行业务参号\" 120 1 0:0 1 ",
                    "28 23 \"变动编号\" 100 1 0:2 1 ",
                    "25 24 \"期初余额\" 100 2 8:1 2 4",
                    "26 25 \"变动日期\" 160 4 7:2 1 ",
                    "29 26 \"提款币种\" 100 1 0:2 1 ",
                    "30 27 \"提款金额\" 100 2 8:1 2 4",
                    "31 28 \"结汇金额\" 100 2 8:1 2 4",
                    "32 29 \"资金用途\" 100 1 0:0 1 DOFUSE",
                    "33 30 \"还本币种\" 100 1 0:2 1 ",
                    "34 31 \"还本金额\" 100 2 8:1 2 4",
                    "35 32 \"购汇还本金额\" 120 2 8:1 2 4",
                    "36 33 \"付息币种\" 100 1 0:2 1 ",
                    "37 34 \"付息金额\" 100 2 8:1 2 4",
                    "38 35 \"购汇付息金额\" 120 2 8:1 2 4",
                    "39 36 \"期末余额\" 100 2 8:1 2 4",
                    "40 37 \"备注\" 180 1 0:0 1 ",
                ],
                data: [],
            },
            stmData: {
                columns: [
                    "0 1 \"业务流水\" 100 1 0:2 1 ",
                    "2 2 \"申报号码\" 220 1 0:0 1 ",
                    "3 3 \"业务参考号\" 150 1 0:0 1 ",
                    "4 4 \"柜员\" 100 1 0:2 1 ",
                    "5 5 \"日期\" 150 4 7:2 1 ",
                    // "6 6 \"申报类型\" 120 1 0:2 1 CFATYP",
                    { index: 6, position: 6, width: 120, pattern: 'code', label: '申报类型', code: this.codes.cfatyp1 },
                    "7 7 \"信息类型\" 120 1 0:2 1 ",
                    "8 8 \"操作类型\" 100 1 0:2 1 ",
                    // "9 9 \"状态\" 80 1 20:0 1 TransCFASTA",
                    { index: 9, position: 9, width: 100, pattern: 'code', label: '状态', code: this.codes.staflg1 },
                ],
                data: [],
            },
        }
    },
    watch: {
        "model.cfaquep.cfatyp"(newValue, oldValue) {
            console.log(newValue);
            switch (newValue) {
                case "ALL":
                    this.stmData = this.stmDataAll;
                    break;
                case "EAD":
                    this.stmData = this.stmDataEad;
                    break;
                case "EAF":
                    this.stmData = this.stmDataEaf;
                    break;
                case "EBA":
                    this.stmData = this.stmDataEba;
                    break;
                case "ECA":
                    this.stmData = this.stmDataEca;
                    break;
            }
        }
    },
    methods: {
        ...Event,
        async handleSearch() {
            // this.stmData.data = [];
            let frmdat = this.model.cfaquep.frmdat;
            if (!frmdat || frmdat == '') {
                this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
                return;
            }
            let tildat = this.model.cfaquep.tildat;
            if (!tildat || tildat == '') {
                this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
                return;
            }
            let rtnmsg = await this.executeRule("serbut")
            if (rtnmsg.respCode == SUCCESS) {
                switch (this.model.cfaquep.cfatyp) {
                    case "ALL":
                        this.stmData.data = rtnmsg.data.eblstm.rows;
                        break;
                    case "EAD":
                        this.stmData.data = rtnmsg.data.eadstm.rows;
                        break;
                    case "EAF":
                        this.stmData.data = rtnmsg.data.eafstm.rows;
                        break;
                    case "EBA":
                        this.stmData.data = rtnmsg.data.ebastm.rows;
                        break;
                    case "ECA":
                        this.stmData.data = rtnmsg.data.ecastm.rows;
                        break;
                }
                this.updateModel(rtnmsg.data);
                if (this.stmData.data.length == 0) {
                    this.$notify({
                        title: '成功',
                        message: '搜索完毕,无满足条件记录',
                        type: 'success'
                    });

                } else {
                    this.$notify({
                        title: '成功',
                        message: '查询成功',
                        type: 'success'
                    });

                }

            }
            else {
                let errorMsg = "";
                if (res.fieldErrors) {
                    let errorMsgkey = "";
                    let errorMsgVal = "";
                    for (const key in res.fieldErrors) {
                        errorMsgkey = key;
                        errorMsgVal = res.fieldErrors[key];
                    }
                    errorMsg = errorMsgkey + ':' + errorMsgVal;
                } else if (res.respMsg) {
                    errorMsg = res.respMsg;
                }

                this.$notify.error({ title: '错误', message: '查询失败!错误信息[' + errorMsg + ']' });
            }
        },
        toEadadd() {
            this.$router.history.push({ name: "Eadadd", params: { prePageId: this.model.pageId } });
        },
        toEafadd() {
            this.$router.history.push({ name: "Eafadd", params: { prePageId: this.model.pageId } });
        },
        toEbaadd() {
            this.$router.history.push({ name: "Ebaadd", params: { prePageId: this.model.pageId } });
        },
        toEcaadd() {
            this.$router.history.push({ name: "Ecaadd", params: { prePageId: this.model.pageId } });
        },
        async getInfo(idx, row) {
            console.log(row);
            let business = row.申报类型.toLowerCase() + "inf";
            const selIds = [idx + 1];
            let selDst;
            console.log(selIds);
            if (this.model.cfaquep.cfatyp == "ALL") {
                selDst = "eblstm" //列表对应后台模型中的stream
            } else {
                selDst = this.model.cfaquep.cfatyp.toLowerCase() + "stm" //列表对应后台模型中的stream
            }
            let params = { selDst, selIds };
            console.log(params);
            this.executeRule("dtlbut", params).then((res) => {
                if ((res.respCode == SUCCESS)) {
                    Utils.copyValueFromVO(this.model, res.data);
                    // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                    console.log(this.model.pageId);
                    this.$router.push({ name: business.charAt(0).toUpperCase() + business.substring(1), params: { prePageId: this.model.pageId } });
                } else {
                    const h = this.$createElement;
                    const msg = res.respMsg || '请求执行失败!'
                    this.$notify.error({ title: '错误', message: h('p', { style: 'word-break:break-all;' }, msg) })
                }
            });
        },
        async getAmend(idx, row) {
            let business = row.申报类型.toLowerCase() + "ame";
            const selIds = [idx + 1];
            let selDst;
            if (this.model.cfaquep.cfatyp == "ALL") {
                selDst = "eblstm" //列表对应后台模型中的stream
            } else {
                selDst = this.model.cfaquep.cfatyp.toLowerCase() + "stm" //列表对应后台模型中的stream
            }
            let params = { selDst, selIds };
            this.executeRule("amebut", params).then((res) => {
                if ((res.respCode == SUCCESS)) {
                    Utils.copyValueFromVO(this.model, res.data);
                    // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                    this.$router.push({ name: business.charAt(0).toUpperCase() + business.substring(1), params: { prePageId: this.model.pageId } });
                } else {
                    const h = this.$createElement;
                    const msg = res.respMsg || '请求执行失败!'
                    this.$notify.error({ title: '错误', message: h('p', { style: 'word-break:break-all;' }, msg) })
                }
            });
        },
        async getDelete(idx, row) {
            console.log(row);
            let business = row.申报类型.toLowerCase() + "del";
            const selIds = [idx + 1];
            let selDst;
            if (this.model.cfaquep.cfatyp == "ALL") {
                selDst = "eblstm" //列表对应后台模型中的stream
            } else {
                selDst = this.model.cfaquep.cfatyp.toLowerCase() + "stm" //列表对应后台模型中的stream
            }
            let params = { selDst, selIds };
            this.executeRule("delbut", params).then((res) => {
                if ((res.respCode == SUCCESS)) {
                    Utils.copyValueFromVO(this.model, res.data);
                    // this.$router.push({ path: "business/inftrnpsDetail", query: { idx: idx}});
                    this.$router.push({ name: business.charAt(0).toUpperCase() + business.substring(1), params: { prePageId: this.model.pageId } });
                } else {
                    const h = this.$createElement;
                    const msg = res.respMsg || '请求执行失败!'
                    this.$notify.error({ title: '错误', message: h('p', { style: 'word-break:break-all;' }, msg) })
                }
            });
        }
    },
    // created: function () {
    //     console.log(this.model.pageId);
    // },
    mounted() {
        console.log(this.model.pageId);
    }
}
</script>
<style>

</style>