Ptyp.vue 7.13 KB
Newer Older
1
<template>
wangyanjiao committed
2 3 4
    <c-row>
        <c-col :span="11">
            <c-ptap :model="model" :argadr="{
wangyanjiao committed
5 6 7
            title: 'Drawer',
            grp: 'bodgrp',
            rol: 'drr',
8
        }" :disabledRef="false" :disabledExtkey="true" :disabled="true">
wangyanjiao committed
9 10 11
            </c-ptap>

            <c-ptap :model="model" :argadr="{
wangyanjiao committed
12 13 14
            title: 'Drawee',
            grp: 'bodgrp',
            rol: 'dre',
15
        }" :disabledRef="true" :disabledExtkey="true" :disabled="true" >
wangyanjiao committed
16 17 18 19
            </c-ptap>
        </c-col>
        <c-col :span="11" :offset="1">
            <c-ptap :model="model" :argadr="{
wangyanjiao committed
20 21 22
            title: 'Collecting Bank',
            grp: 'bodgrp',
            rol: 'col',
23
        }" :disabledRef="true" :disabledExtkey="true" :disabled="true" >
wangyanjiao committed
24 25 26 27 28 29
            </c-ptap>
        </c-col>

        <c-col :span="24">
            <c-table max-height="300px" style="text-align: center;" stripe :list="this.model.botp.ptsaddp.ptsaddg || []"
                :paginationShow="false" :border="true">
huangxin committed
30
                <el-table-column label="Additional Parties">
wangyanjiao committed
31 32
                    <el-table-column label="角色" width="auto" prop="rol">
                        <template slot-scope="scope">
huangxin committed
33
                            <c-select v-model="scope.row.rol" :code="ptyp2">
wangyanjiao committed
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
                            </c-select>
                        </template>

                    </el-table-column>
                    <el-table-column label="机构实体" width="auto" prop="ptyextkey">
                        <template slot-scope="scope">
                            <c-input v-model="scope.row.ptyextkey" maxlength="12">
                            </c-input>
                        </template>
                    </el-table-column>
                    <el-table-column label="名称" width="auto" prop="nam">
                        <template slot-scope="scope">
                            <c-input v-model="scope.row.nam" maxlength="12">
                            </c-input>
                        </template>
                    </el-table-column>
                    <el-table-column label="参考地址" width="auto" prop="ref">
                        <template slot-scope="scope">
                            <c-input v-model="scope.row.ref" maxlength="12">
                            </c-input>
                        </template>
                    </el-table-column>
                    <el-table-column label="Document" prop="docnam" width="auto">
                        <template slot="header" slot-scope="scope">
                            <c-row>
                                <c-col :span="12">
                                    <span style="line-height: 36px;">操作</span>
                                </c-col>
                                <c-col :span="12">
                                    <div style="float: right;">
                                        <span class="add_del_button add_button" @click="addTableValue">+</span>
                                        <span class="add_del_button" @click="deleteTable">-</span>
                                    </div>
                                </c-col>
                            </c-row>
                        </template>
                        <template slot-scope="scope">
                            <el-button size="mini" @click="handleEdit(scope.$index, scope.row)" type="primary">详情
                            </el-button>
                        </template>
huangxin committed
74
                        </el-table-column>
wangyanjiao committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
                    </el-table-column>
            </c-table>
        </c-col>

        <!-- <c-col :span="24">
            <c-edit-table :model="model" v-bind="ptsaddg">
                <el-table-column label="操作" text-align="center">
                    <template slot-scope="scope">
                        <el-button size="mini" @click="handleEdit(scope.$index, scope.row)" type="primary">详情
                        </el-button>
                    </template>
                </el-table-column>
            </c-edit-table>
        </c-col> -->
    </c-row>
90 91
</template>
<script>
wangyanjiao committed
92 93 94 95 96 97
    import Api from "~/service/Api"
    import commonProcess from "~/mixin/commonProcess";
    import CodeTable from "~/config/CodeTable"
    import Event from "~/model/Botdcr/Event"
    import Utils from "~/utils";
    import Ptap from "~/views/Public/Ptap";
98

wangyanjiao committed
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
    export default {
        components: { "c-ptap": Ptap },
        inject: ['root'],
        props: ["model", "codes"],
        mixins: [commonProcess],
        data() {
            return {
                // ptsaddg: {
                //     columns: [
                //         {
                //             title: "角色",
                //             width: "120px",
                //             dataIndex: "rol",
                //             show: "select",
                //             code: [
                //                 { label: "1st Third Party", value: "TP1" },
                //                 { label: "2nd Third Party", value: "TP2" },
                //             ]
                //         },
                //         {
                //             title: "机构实体",
                //             width: "180px",
                //             dataIndex: "ptyextkey",
                //             show: "input",
                //         },
                //         {
                //             title: "名称",
                //             width: "300px",
                //             dataIndex: "nam",
                //         },
                //         {
                //             title: "参考地址",
                //             width: "300px",
                //             dataIndex: "ref",
                //         },
                //     ],
                //     urls: "botp.ptsaddp.ptsaddg",
                // },

                newValue: {
                    rol:"",
                    ptyextkey:"",
                    nam:"",
                    ref:"",
wangyanjiao committed
143
                },
huangxin committed
144 145 146 147 148 149 150 151 152 153 154
                ptyp2: [
                    { label: "TP0 Third Party", value: "TP0" },
                    { label: "TP1 1st Third Party", value: "TP1" },
                    { label: "TP2 2nd Third Party", value: "TP2" },
                    { label: "TP3 3rd Third Party", value: "TP3" },
                    { label: "TP4 4th Third Party", value: "TP4" },
                    { label: "TP5 5th Third Party", value: "TP5" },
                    { label: "TP6 6th Third Party", value: "TP6" },
                    { label: "TP7 7th Third Party", value: "TP7" },
                    { label: "TP8 8th Third Party", value: "TP8" },
                ],
wangyanjiao committed
155 156 157 158 159 160 161 162 163
            }
        },
        methods: {
            ...Event,
            addTableValue(index) {
                var newTableValue = Object.assign({}, this.newValue);
                const serial = Utils.generateUUID();
                newTableValue.serialNum = serial;
                this.model.botp.ptsaddp.ptsaddg.splice(index - 1, 0, newTableValue);
wangyanjiao committed
164
            },
wangyanjiao committed
165 166 167 168 169 170
            deleteTable(index) {
                this.model.botp.ptsaddp.ptsaddg.splice(index, 1);
            },
        },
        created: function () {
            onsole.log(this.root);
171 172 173 174 175
        }
    }
</script>
<style>

wangyanjiao committed
176
</style>