Setpan.vue 22.2 KB
Newer Older
潘际乾 committed
1 2 3
<template>
    <c-row class="eibs-tab">
        <!-- ====================顶部==================== -->
liushikai committed
4 5
        <c-col :span="6" style="margin-left:9px">
            <el-form-item label="参考号" label-width="50px">
潘际乾 committed
6
                <c-input
liushikai committed
7
                    v-model="model.setmod.ref"
潘际乾 committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
                    maxlength="16"
                    :readonly="true"
                    placeholder="请输入our reference"
                ></c-input>
            </el-form-item>
        </c-col>
        <c-col :span="4">
            <el-form-item label="结算金额" label-width="100px">
                <c-input
                    v-model="model.setmod.doccur"
                    style="width: 100%"
                    placeholder="CNY"
                    :readonly="true"
                    
                ></c-input>
            </el-form-item>
        </c-col>

liushikai committed
26 27
        <c-col :span="6">
            <el-form-item label="" label-width="7px">
潘际乾 committed
28 29 30 31 32 33 34 35
                <c-input
                    v-model="model.setmod.docamt"
                    :readonly="true"
                    placeholder="请输入document amount"
                ></c-input>
            </el-form-item>
        </c-col>

liushikai committed
36
        <c-col :span="5">
潘际乾 committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
            <el-form-item label="类型" label-width="100px">
                <c-select
                    v-model="model.setmod.dspflg"
                    disabled
                    style="width: 100%"
                    placeholder="请选择Type of settlement"
                >
                    <el-option
                        v-for="item in codes.dspflg"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    >
                    </el-option>
                </c-select>
            </el-form-item>
        </c-col>
liushikai committed
54 55 56 57 58 59 60
        <c-col :span="2" style="text-align:right">
            <!-- <el-form-item label="" label-width="20px"> -->
                <c-button style="margin-right:10px" size="small" type="primary" @click="onSetmodDet">
                    详情
                </c-button>
            <!-- </el-form-item> -->
        </c-col>
潘际乾 committed
61 62 63 64 65 66 67 68 69 70 71

        <!--
        <c-col :span="12">
        <el-form-item label="自贸区账号">
            <c-input  v-model="model.setmod.zmqacc" maxlength="20"  placeholder="请输入自贸区账号"></c-input>
        </el-form-item>
       </c-col>    
       <c-col :span="6" style="text-align:center">
	    <c-checkbox v-model="model.setmod.xreflg">Recalculate Rates</c-checkbox>
       </c-col> 
       -->
liushikai committed
72 73 74
       <c-col :span="23" style="margin-left:9px;height:25px">
           <el-divider></el-divider>
       </c-col>
潘际乾 committed
75 76
        <!-- ==============中部表格===================== -->

liushikai committed
77
        <c-col :span="23" style="height:24px;margin-left:9px">
潘际乾 committed
78
            <el-form-item
liushikai committed
79
                class="formItemLabel"
潘际乾 committed
80
                label="Foreign Commission/Charges:"
liushikai committed
81
                label-width="300px"
潘际乾 committed
82 83 84
            >
            </el-form-item>
        </c-col>
liushikai committed
85 86
        
        <c-col :span="23" style="margin-left:9px">
潘际乾 committed
87 88 89 90 91 92
            <c-table
                style="text-align: center"
                :list="model.setmod.setfog.setfol"
                :paginationShow="false"
                :border="true"
            >
liushikai committed
93
                <el-table-column label="Payer" prop="ptydbt" width="101px">
潘际乾 committed
94
                    <template slot-scope="scope">
liushikai committed
95
                        <el-select v-model="scope.row.ptydbt">
潘际乾 committed
96
                            <el-option
liushikai committed
97 98 99 100 101 102 103
                                        v-for="item in codes.ptydbt"
                                        :key="item.value"
                                        :label="item.value"
                                        :value="item.value"
                                    >
                                        <span style="float: left">{{ item.label }}</span>
                                    </el-option>
潘际乾 committed
104 105 106
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
107
                <el-table-column label="Payee" width="101px">
潘际乾 committed
108
                    <template slot-scope="scope">
liushikai committed
109
                        <el-select v-model="scope.row.payee">
潘际乾 committed
110
                            <el-option
liushikai committed
111
                                v-for="item in codes.payee"
潘际乾 committed
112
                                :key="item.value"
liushikai committed
113
                                :label="item.value"
潘际乾 committed
114 115
                                :value="item.value"
                            >
liushikai committed
116
                            <span style="float: left">{{ item.label }}</span>
潘际乾 committed
117 118 119 120
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
121
                <el-table-column label="Source" prop="src" width="70px">
潘际乾 committed
122
                </el-table-column>
liushikai committed
123
                <el-table-column label="Disp" prop="dsp" width="76px">
潘际乾 committed
124 125 126 127 128 129 130 131 132 133 134 135 136
                </el-table-column>
                <el-table-column
                    label="Text for Payer"
                    prop="txtdbt"
                    width="auto"
                >
                </el-table-column>
                <el-table-column
                    label="Text for Payee"
                    prop="txtpay"
                    width="auto"
                >
                </el-table-column>
liushikai committed
137
                <el-table-column label="Currency" prop="cur" width="93px">
潘际乾 committed
138
                    <template slot-scope="scope">
liushikai committed
139
                        <el-select v-model="scope.row.cur">
潘际乾 committed
140 141 142 143 144 145 146 147 148 149
                            <el-option
                                v-for="item in codes.cur"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            >
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
150
                <el-table-column label="Amount" prop="amt" width="150px">
潘际乾 committed
151
                </el-table-column>
liushikai committed
152
                <el-table-column label="" prop="det" width="80px" fixed="right">
潘际乾 committed
153 154
                    <template slot-scope="scope" slot="header">
                        <el-button
liushikai committed
155 156 157
                            circle
                            style="padding:4px"
                            class="el-icon-plus"
潘际乾 committed
158 159 160 161 162
                            size="mini"
                            @click="addRow(scope)"
                        >
                        </el-button>
                        <el-button
liushikai committed
163 164 165
                            style="padding:4px"
                            circle
                            class="el-icon-minus"
潘际乾 committed
166 167 168 169 170 171 172
                            size="mini"
                            @click="removeRow(scope)"
                        >
                        </el-button>
                    </template>
                    <template slot-scope="scoped">
                        <el-button
liushikai committed
173 174
                            style="margin-left:0"
                            size="small"
liushikai committed
175
                            type="primary"
潘际乾 committed
176
                            @click="detail1(scoped.$index, scoped.row)"
liushikai committed
177
                            >详情</el-button
潘际乾 committed
178 179 180 181 182 183 184
                        >
                    </template>
                </el-table-column>
            </c-table>
        </c-col>
        <c-col>
            <el-dialog :visible.sync="dialogVisible" center>
潘际乾 committed
185 186 187 188
                <c-col>
                    <el-form :model="dialog" label-width="200px">
                        <c-col :span="16" >
                            <el-form-item label="收款人">
liushikai committed
189
                                <el-select v-model="dialog.payee" style="width: 100%">
潘际乾 committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
                                    <el-option
                                        v-for="item in codes.payee"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="收款人摘要">
                                <c-input v-model="dialog.txtpay" style="width: 100%"/>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="付款人">
                                <el-select v-model="dialog.ptydbt" style="width: 100%">
                                    <el-option
                                        v-for="item in codes.ptydbt"
                                        :key="item.value"
liushikai committed
210
                                        :label="item.label"
潘际乾 committed
211
                                        :value="item.value"
liushikai committed
212 213
                                    >
                                    </el-option>
潘际乾 committed
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
                                </el-select>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item label="付款人摘要">
                                <c-input v-model="dialog.txtdbp" style="width: 100%"/>
                            </el-form-item>
                        </c-col>
                        <c-col :span="16">
                            <c-col :span="18">
                                <el-form-item label="费用">
                                    <c-select v-model="dialog.cur" style="width: 100%">
                                        <el-option
                                            v-for="item in codes.cur"
                                            :key="item.value"
                                            :labelF="item.label"
                                            :value="item.value"
                                        />
                                    </c-select>
                                </el-form-item>
                            </c-col>
                            <c-col :span="6">
                                <el-form-item label="" label-width="20px">
                                    <c-input v-model="dialog.amt" style="width: 100%"/>
                                </el-form-item>
                            </c-col>
                        </c-col>
                        <c-col :span="16">
                            <el-form-item>
                                <c-checkbox v-model="dialog.forflg">CG00005</c-checkbox>
                            </el-form-item>
                        </c-col>
                    </el-form>
                </c-col>
潘际乾 committed
248
                <span slot="footer" class="dialog-footer">
潘际乾 committed
249
                    <el-button type="primary" @click="saveDialog">确 定</el-button>
潘际乾 committed
250 251 252 253 254
                    <el-button @click="dialogVisible = false">取 消</el-button>
                </span>
            </el-dialog>
        </c-col>
        <!--=================== Own Commission/Charges:================== -->
liushikai committed
255
        <c-col :span="23" style="margin-left:9px;height:24px;margin-top:25px">
liushikai committed
256
            <el-form-item class="formItemLabel" label="Own Commission/Charges:" label-width="200px"> </el-form-item>
潘际乾 committed
257
        </c-col>
liushikai committed
258
        <c-col :span="23" style="margin-left:9px">
潘际乾 committed
259 260 261 262 263 264
            <c-table
                style="text-align: center"
                :list="model.setmod.setfeg.setfel"
                :paginationShow="false"
                :border="true"
            >
liushikai committed
265
                <el-table-column label="Role" width="101px">
潘际乾 committed
266 267 268 269 270
                    <template #default="scope">
                        <el-select v-model="scope.row.rol">
                            <el-option
                                v-for="item in codes.setfelRol"
                                :key="item.value"
liushikai committed
271
                                :label="item.value"
潘际乾 committed
272 273
                                :value="item.value"
                            >
liushikai committed
274
                            <span style="float: left">{{ item.label }}</span>
潘际乾 committed
275 276 277 278
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
279
                <el-table-column label="Code" prop="feecod" width="101px">
潘际乾 committed
280
                </el-table-column>
liushikai committed
281
                <el-table-column label="Source" prop="src" width="70px">
潘际乾 committed
282
                </el-table-column>
liushikai committed
283
                <el-table-column label="Disp" width="76px">
潘际乾 committed
284 285 286 287 288
                    <template #default="scope">
                        <el-select v-model="scope.row.dsp" @change="dispDefault">
                            <el-option
                                v-for="item in codes.setfeldsp"
                                :key="item.value"
liushikai committed
289
                                :label="item.value"
潘际乾 committed
290 291
                                :value="item.value"
                            >
liushikai committed
292
                            <span style="float: left">{{ item.label }}</span>
潘际乾 committed
293 294 295 296
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
297
                <el-table-column label="Units" prop="unt" width="70px">
潘际乾 committed
298 299 300 301 302 303 304
                </el-table-column>
                <el-table-column
                    label="Long Fee Text"
                    prop="feetxtinf"
                    width="auto"
                >
                </el-table-column>
liushikai committed
305
                <el-table-column label="Currency" prop="cur" width="100px">
潘际乾 committed
306 307 308 309
                </el-table-column>
                <el-table-column
                    label="Original Amount"
                    prop="ogiamt"
liushikai committed
310
                    width="150px"
潘际乾 committed
311 312
                >
                </el-table-column>
liushikai committed
313
                <el-table-column label="Fee Amount" prop="amt" width="150px">
潘际乾 committed
314
                </el-table-column>
liushikai committed
315
                <el-table-column label="" prop="det" width="80px" fixed="right">
liushikai committed
316 317 318 319 320 321 322 323 324
                     <template slot-scope="scope" slot="header">
                        <el-button
                            circle
                            style="padding:4px"
                            class="el-icon-plus"
                            size="mini"
                            @click="addRow(scope)"
                        >
                        </el-button>
潘际乾 committed
325
                        <el-button
liushikai committed
326 327 328
                            style="padding:4px"
                            circle
                            class="el-icon-minus"
潘际乾 committed
329
                            size="mini"
liushikai committed
330 331 332 333
                            @click="removeRow(scope)"
                        >
                        </el-button>
                    </template>
潘际乾 committed
334 335
                    <template slot-scope="scoped">
                        <el-button
liushikai committed
336 337
                            style="margin-left:0"
                            size="small"
liushikai committed
338
                            type="primary"
潘际乾 committed
339
                            @click="detail2(scoped.$index, scoped.row)"
liushikai committed
340
                            >详情</el-button
潘际乾 committed
341 342 343 344 345
                        >
                    </template>
                </el-table-column>
            </c-table>
        </c-col>
346
        <setpan-dialog ref="setpanDialog" :model="model" :idx="index" :codes="codes"/>
liushikai committed
347
        <c-col :span="23" style="margin-left:9px;height:24px;margin-top:25px">
liushikai committed
348
            <el-form-item class="formItemLabel" label="Settlement:" label-width="200px">
潘际乾 committed
349 350
            </el-form-item>
        </c-col>
liushikai committed
351
        <c-col :span="23" style="margin-left: 9px">
潘际乾 committed
352 353 354 355 356 357
            <c-table
                style="text-align: center"
                :list="model.setmod.setglg.setgll"
                :paginationShow="false"
                :border="true"
            >
liushikai committed
358
                <el-table-column label="Mod" prop="modflg" width="46px">
潘际乾 committed
359
                </el-table-column>
liushikai committed
360
                <el-table-column label="Role" prop="rol" width="55px">
潘际乾 committed
361
                </el-table-column>
liushikai committed
362
                <el-table-column label="in" prop="acccur" width="101px">
潘际乾 committed
363 364 365 366 367
                    <template slot-scope="scope">
                        <el-select v-model="scope.row.acccur">
                            <el-option
                                v-for="item in codes.acccur"
                                :key="item.value"
liushikai committed
368
                                :label="item.value"
潘际乾 committed
369 370
                                :value="item.value"
                            >
liushikai committed
371
                            <span style="float: left">{{ item.label }}</span>
潘际乾 committed
372 373 374 375 376 377 378
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column
                    label="Amount Paid"
                    prop="fmtaccamt"
liushikai committed
379
                    width="120px"
潘际乾 committed
380 381
                >
                </el-table-column>
liushikai committed
382
                <el-table-column label="Disp." width="101px">
潘际乾 committed
383 384 385 386 387
                    <template #default="scope">
                        <el-select v-model="scope.row.dsp">
                            <el-option
                                v-for="item in codes.setglldsp"
                                :key="item.value"
liushikai committed
388
                                :label="item.value"
潘际乾 committed
389 390
                                :value="item.value"
                            >
liushikai committed
391 392
                            <span style="float: left">{{ item.value }}</span>
                            <span style="float: left;margin-left:20px">{{ item.label }}</span>
潘际乾 committed
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column label="Account" prop="act" width="auto">
                    <template slot-scope="scope">
                        <el-select v-model="scope.row.act">
                            <el-option
                                v-for="item in scope.act"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            >
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
liushikai committed
410
                <el-table-column label="C" prop="debcdtflg" width="45px">
潘际乾 committed
411
                </el-table-column>
liushikai committed
412
                <el-table-column label="Curr." prop="cur" width="55px">
潘际乾 committed
413 414 415 416
                </el-table-column>
                <el-table-column
                    label="Original Amount"
                    prop="fmtamt"
liushikai committed
417
                    width="150px"
潘际乾 committed
418 419
                >
                </el-table-column>
liushikai committed
420
                <el-table-column label="Rate" prop="rat" width="120px">
潘际乾 committed
421
                </el-table-column>
liushikai committed
422
                <el-table-column label="操作" width="135px" fixed="right"> 
liushikai committed
423 424 425 426 427 428 429
                    <template>
                        <el-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            >Get</el-button
                        >
liushikai committed
430 431 432 433 434 435
                        <el-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            >详情</el-button
                        >
liushikai committed
436
                    </template>
潘际乾 committed
437
                </el-table-column>
liushikai committed
438
                <!-- <el-table-column label="" width="80px">
liushikai committed
439 440 441 442 443 444 445
                    <template>
                        <el-button
                            style="margin-left:0"
                            size="small"
                            type="primary"
                            >详情</el-button
                        >
liushikai committed
446
                    </template> </el-table-column> -->
潘际乾 committed
447 448 449
            </c-table>
        </c-col>

liushikai committed
450
        <!-- <c-col :span="12" style="margin-bottom: 10px;">
潘际乾 committed
451 452
            <span v-text="model.setmod.retmsg" data-path=".setmod.retmsg">
            </span>
liushikai committed
453
        </c-col> -->
潘际乾 committed
454

liushikai committed
455
        <!-- <c-col :span="12" style="margin-bottom: 10px;">
潘际乾 committed
456 457
            <span v-text="model.setmod.zmqacclab" data-path=".setmod.zmqacclab">
            </span>
liushikai committed
458
        </c-col> -->
潘际乾 committed
459

liushikai committed
460
        <!-- <c-col :span="12" style="margin-bottom: 10px;">
潘际乾 committed
461 462 463 464 465
            <span
                v-text="model.setmod.setglg.labdspflg"
                data-path=".setmod.setglg.labdspflg"
            >
            </span>
liushikai committed
466
        </c-col> -->
潘际乾 committed
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
    </c-row>
</template>
<script>
import Event from "~/model/Ditopn/Event";
import CommonProcess from "~/mixin/CommonProcess";
import SetpanDialog from "./SetpanDialog.vue";
import Api from "~/service/Api"
import Utils from "~/utils/index"

export default {
    inject: ['root'],
    components: { SetpanDialog },
    props: ["model", "codes"],
    mixins: [CommonProcess],
    data() {
        return {
            dialogVisible: false,
            dialog: {
                payee: "",
                ptydbt: "",
                txtpay: "",
                txtdbt: "",
                CG00005: "",
            },
            dialog2: {
                feetxtinf:"",
                feetxt:"",
            },
            index: 0,
        };
    },
    methods: {
        ...Event,
        //第一个表格
        addRow() {
            let newRow = { ...dialog };
            this.model.setmod.setfog.setfol.push(newRow);
        },
        removeRow() {
            this.model.setmod.setfog.setfol.pop();
        },
        saveDialog() {
liushikai committed
509
            this.dialogVisible = false;
潘际乾 committed
510 511 512 513
            this.model.setmod.setfog.setfol[this.index] = this.dialog;
        },
        // 第二个表格
        detail1(index, row) {
hulei committed
514
            this.executeDefault("setfel/det").then(res=>{
潘际乾 committed
515 516 517 518 519 520 521 522 523 524 525 526 527 528
                this.dialogVisible = true;
                this.dialog = row;
                this.index = index;
            })
            
        },
        dispDefault(){
            this.executeDefault("mac").then(res=>{
                Utils.copyValueFromVO(this.model, res.data)
            })
            
        },
        // 第三个表格
        detail2(index, row) {
529
            const that = this;
hulei committed
530 531
            const rule = "setmod.setfeg.setfel("+(index+1)+").det";
            that.executeRule(rule).then(res=>{
532 533 534 535
                that.$refs.setpanDialog.visiable = true;
                that.$refs.setpanDialog.formData = Object.assign({}, that.model.setmod.setfeg.setfel[index]);
                that.index = index;
                that.dialog2 = row
潘际乾 committed
536 537 538 539 540 541
            })
        },
    },
    created: function () {},
};
</script>
liushikai committed
542 543 544 545 546 547 548 549
<style scoped>
.el-col >>> .el-divider--horizontal {
    margin-top: 10px;
}
.formItemLabel >>> .el-form-item__label{
    text-align: left;
    font-weight:bold;
}
潘际乾 committed
550
</style>