Setp.vue 15.4 KB
Newer Older
jxl committed
1
<template>
huangxin committed
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
  <c-row>
    <c-row>
      <!-- ====================左边======================= -->
      <c-col :span="11">
        <c-col :span="24">
          <c-col :span="22">
            <el-form-item
              label="Reference"
              prop="bodgrp.rec.ownref"
              style="width: 100%"
            >
              <c-input
                v-model="model.bodgrp.rec.ownref"
                maxlength="16"
                placeholder="请输入Reference"
                style="width: 95%"
                disabled
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="2">
            <c-button
              style="margin: 0 10px 0 0; padding: 0 10px"
              size="small"
              type="primary"
              icon="el-icon-search"
            ></c-button>
          </c-col>
        </c-col>
31

huangxin committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
        <c-col :span="12">
          <el-form-item label="Document Amount" prop="bodgrp.cbs.max.cur">
            <c-select
              disabled
              v-model="model.bodgrp.cbs.max.cur"
              style="width: 100%"
              placeholder="请选择Currency"
            >
              <el-option
                v-for="item in codes.cur"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
jxl committed
51
          <el-form-item
huangxin committed
52 53 54
            style="text-align: left"
            label-width="5px"
            prop="bodgrp.cbs.max.amt"
jxl committed
55
          >
huangxin committed
56
            <c-input-currency
jxl committed
57
              disabled
huangxin committed
58 59 60 61 62 63 64
              v-model="model.bodgrp.cbs.max.amt"
              style="text-align: left; width: 100%"
              placeholder="请输入Document Amount"
              @keyup.enter.native="
                defaultFunction('bodgrp.cbs.max.amt', model.bodgrp.cbs.max.amt)
              "
            ></c-input-currency>
jxl committed
65 66
          </el-form-item>
        </c-col>
huangxin committed
67 68 69 70 71 72 73
        <c-col :span="12">
          <el-form-item label="Open Amount" prop="bodgrp.cbs.opn1.cur">
            <c-select
              disabled
              v-model="model.bodgrp.cbs.opn1.cur"
              style="width: 100%"
              placeholder="请选择Currency"
jxl committed
74
            >
huangxin committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
              <el-option
                v-for="item in codes.cur"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item
            style="text-align: left"
            label-width="5px"
            prop="bodgrp.cbs.opn1.amt"
jxl committed
90
          >
huangxin committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104
            <c-input-currency
              disabled
              v-model="model.bodgrp.cbs.opn1.amt"
              style="text-align: left; width: 100%"
              placeholder="请输入Warehouse/Insurance"
              @keyup.enter.native="
                defaultFunction(
                  'bodgrp.cbs.opn1.amt',
                  model.bodgrp.cbs.opn1.amt
                )
              "
            ></c-input-currency>
          </el-form-item>
        </c-col>
jxl committed
105

huangxin committed
106 107 108 109 110 111 112 113 114 115
        <c-col :span="24">
          <el-form-item
            label="Collection Condition"
            prop="bodgrp.rec.doctypcod"
          >
            <c-select
              disabled
              v-model="model.bodgrp.rec.doctypcod"
              style="width: 100%"
              placeholder="请选择Collection Condition"
116 117
            >
              <el-option
huangxin committed
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
                v-for="item in codes.doctypcod"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="Document Set Status" prop="bodgrp.rec.docsta">
            <c-select
              disabled
              v-model="model.bodgrp.rec.docsta"
              style="width: 100%"
              placeholder="请输入Document Set Status"
              :code="codes.docstabot"
            ></c-select>
          </el-form-item>
        </c-col>
        <c-col :span="18">
          <el-form-item label="Tenor Specification" prop="bodgrp.rec.matdat">
            <c-date-picker
              type="date"
              disabled
              v-model="model.bodgrp.rec.matdat"
              style="width: 100%"
              placeholder="请选择Maturity Date"
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="5">
          <el-form-item label="" label-width="5px">
            <c-input
              disabled
              v-model="model.bodgrp.rec.matpercnt"
              placeholder="请输入Tenor Specification"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="1">
          <el-form-item label="Days" label-width="5px"> </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="  " prop="bodgrp.rec.matperbeg">
            <c-select
              disabled
              v-model="model.bodgrp.rec.matperbeg"
              style="width: 100%"
              placeholder="请选择Start of Maturity Period MATBEG"
168
            >
huangxin committed
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
              <el-option
                v-for="item in codes.matperbeg"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="Order Date" prop="bodgrp.rec.rcvdat">
            <c-date-picker
              type="date"
              disabled
              v-model="model.bodgrp.rec.rcvdat"
              style="width: 100%"
              placeholder="请选择Order Date"
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="Presentation Date" prop="bodgrp.rec.predat">
            <c-date-picker
              type="date"
              disabled
              v-model="model.bodgrp.rec.predat"
              style="width: 100%"
              placeholder="请选择Presentation Date"
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
      <!-- ====================右边======================= -->
      <c-col :span="11" :offset="1">
        <c-col :span="24">
huangxin committed
205
          <el-form-item label="Name" prop="bodgrp.rec.nam">
huangxin committed
206 207 208 209 210 211 212 213 214
            <c-input
              align="middle"
              v-model="model.bodgrp.rec.nam"
              maxlength="40"
              disabled
              placeholder="请输入Externally Displayed Name to Identify the Contract"
            ></c-input>
          </el-form-item>
        </c-col>
215

huangxin committed
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
        <c-col :span="24">
          <el-form-item label="Drawer Ref" prop="bodgrp.drr.pts.ref">
            <c-input
              disabled
              v-model="model.bodgrp.drr.pts.ref"
              maxlength="16"
              placeholder="请输入Drawer"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="" prop="bodgrp.drr.pts.nam">
            <c-input
              disabled
              v-model="model.bodgrp.drr.pts.nam"
              maxlength="40"
              placeholder="请输入Name of Party"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="Collecting Bank Ref" prop="bodgrp.col.pts.ref">
            <c-input
              disabled
              v-model="model.bodgrp.col.pts.ref"
              maxlength="16"
              placeholder="请输入Collecting Bank"
            ></c-input>
          </el-form-item>
        </c-col>
246

huangxin committed
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
        <c-col :span="24">
          <el-form-item label="" prop="bodgrp.col.pts.nam">
            <c-input
              disabled
              v-model="model.bodgrp.col.pts.nam"
              maxlength="40"
              placeholder="请输入Name of Party"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="Drawee Ref" prop="bodgrp.dre.pts.ref">
            <c-input
              disabled
              v-model="model.bodgrp.dre.pts.ref"
              maxlength="16"
              placeholder="请输入Drawee"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="" prop="bodgrp.dre.pts.nam">
            <c-input
              disabled
              v-model="model.bodgrp.dre.pts.nam"
              maxlength="40"
              placeholder="请输入Name of Party"
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-row>
279

huangxin committed
280 281
    <div class="line" />
    <hr />
282

huangxin committed
283
    <!-- next part -->
284 285 286 287 288 289 290
    <c-col :span="24" style="margin-bottom: 35px">
      <c-istream-table
        ref="table"
        :list="model.liaall.tenstm.rows || []"
        :columns="stmData.columns"
        :showSelection="true"
        v-on:multipleSelect="multipleSelect"
huangxin committed
291
        prop="liaall.tenstm"
292 293 294 295 296
      >
      </c-istream-table>
    </c-col>

    <c-col :span="12">
huangxin committed
297
      <c-col :span="24">
huangxin committed
298 299 300 301
        <el-form-item label="" prop="bodgrp.rec.focflg">
        <c-checkbox v-model="model.bodgrp.rec.focflg" 
          >Free of Payment</c-checkbox>
        </el-form-item>
huangxin committed
302 303 304
      </c-col>
      <c-col :span="12">
        <el-form-item label="Reduction Amt." prop="setmod.doccur">
jxl committed
305 306
          <c-select
            disabled
huangxin committed
307
            v-model="model.setmod.doccur"
jxl committed
308 309 310 311 312 313 314 315 316 317 318
            style="width: 100%"
            placeholder="请选择Currency"
          >
            <el-option
              v-for="item in codes.cur"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
jxl committed
319
        </el-form-item>
huangxin committed
320 321
      </c-col>
      <c-col :span="12">
jxl committed
322 323
        <el-form-item
          style="text-align: left"
324
          label-width="5px"
huangxin committed
325
          prop="setmod.redamt"
jxl committed
326
        >
huangxin committed
327
          <c-input-currency
huangxin committed
328
            :disabled="model.bodgrp.rec.focflg == 'X'"
huangxin committed
329
            v-model="model.setmod.redamt"
jxl committed
330 331
            style="text-align: left; width: 100%"
            placeholder="请输入Reduction Amt"
huangxin committed
332 333
            @keyup.enter.native="defaultFunction('setmod.redamt', model.setmod.redamt)"
          ></c-input-currency>
jxl committed
334
        </el-form-item>
huangxin committed
335 336
      </c-col>
      <c-col :span="24">
huangxin committed
337
        <el-form-item label="" prop="mtabut.clsflg">
huangxin committed
338
        <c-checkbox
huangxin committed
339
          :disabled="this.flag1"
huangxin committed
340
          v-model="model.mtabut.clsflg"
huangxin committed
341 342
          >Close Contract</c-checkbox>
        </el-form-item>
huangxin committed
343
      </c-col>
jxl committed
344

huangxin committed
345 346
      <c-col :span="12">
        <el-form-item label="Settle Amt." prop="setmod.doccur">
jxl committed
347 348
          <c-select
            disabled
huangxin committed
349
            v-model="model.setmod.doccur"
jxl committed
350 351 352 353 354 355 356 357 358 359 360 361
            style="width: 100%"
            placeholder="请选择Currency"
          >
            <el-option
              v-for="item in codes.cur"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
huangxin committed
362 363
      </c-col>
      <c-col :span="12">
jxl committed
364 365
        <el-form-item
          style="text-align: left"
366
          label-width="5px"
huangxin committed
367
          prop="setmod.docamt"
jxl committed
368
        >
huangxin committed
369
          <c-input-currency
huangxin committed
370
            v-model="model.setmod.docamt"
jxl committed
371 372
            style="text-align: left; width: 100%"
            placeholder="请输入Settle Amt."
huangxin committed
373
            @change="change1"
huangxin committed
374 375
            @keyup.enter.native="defaultFunction('setmod.docamt', model.setmod.docamt)"
          ></c-input-currency>
jxl committed
376
        </el-form-item>
huangxin committed
377
      </c-col>
jxl committed
378 379
    </c-col>

huangxin committed
380
    <c-col :span="24" style="height: 24px; margin-top: 20px">
381 382 383 384 385 386 387
      <el-form-item label="Bills to Pay Back" 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">
388
      <c-table :data="model.bptbck.bptbckg" style="width: 100%">
389 390 391 392 393 394 395 396 397 398
        <el-table-column prop="ownref" label="Reference" width="389px">
        </el-table-column>
        <el-table-column prop="opncur" label="Cur" width="389px">
        </el-table-column>
        <el-table-column prop="opnamt" label="Open Amount" width="389px">
        </el-table-column>
        <el-table-column prop="bckamt" label="Amount Paid" width="389px">
        </el-table-column>
      </c-table>
    </c-col>
huangxin committed
399
  </c-row>
jxl committed
400 401
</template>
<script>
huangxin committed
402
import Api from "~/service/Api";
wangren committed
403
import commonProcess from "~/mixin/commonProcess";
huangxin committed
404 405
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Botset/Event";
jxl committed
406 407

export default {
huangxin committed
408 409 410 411 412
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
huangxin committed
413
      flag1: true,
huangxin committed
414
      stmData: {
415 416 417 418 419 420
        columns: [
          '1 1 "Type" 250',
          '2 2 "Dbt" 250',
          '3 3 "Cdt" 250',
          '4 4 "Cur" 250',
          '5 5 "Amt" 250 2 8 1 4',
421
          //'6 6 "Mat.Dat." 250 4 7 1',
huangxin committed
422 423 424 425 426 427 428 429 430 431 432
          {
            index: 6,
            position: 6,
            width: 250,
            render: (item, scope) => {
              return scope.row[item.prop] === "null"
                ? ""
                : scope.row[item.prop];
            },
            label: "Mat.Dat.",
          },
433 434
        ],
        data: [],
huangxin committed
435 436 437 438
      },
    };
  },
  computed: {
439
    clsflg: {
440
      get() {
huangxin committed
441
        return this.model.mtabut.clsflg === "O";
442 443
      },
      set(val) {
huangxin committed
444
        this.model.mtabut.clsflg = val ? "C" : "O";
445 446
      },
    },
huangxin committed
447
    
448 449 450 451 452 453 454
    flag() {
      return this.model.mtabut.coninf.usr.extkey == "";
    },
  },
  mounted() {
    this.$nextTick(() => {});
  },
jxl committed
455

huangxin committed
456 457
  methods: {
    ...Event,
huangxin committed
458
    async change1(){
huangxin committed
459
      if(this.model.bodgrp.cbs.opn1.amt<=this.model.setmod.docamt){
huangxin committed
460
            this.flag1=false;
huangxin committed
461
  //          this.model.mtabut.clsflg = "C";
huangxin committed
462
          }
huangxin committed
463 464
      else if(this.model.bodgrp.cbs.opn1.amt>this.model.setmod.docamt){
            this.flag1=true;
huangxin committed
465
   //         this.model.mtabut.clsflg = "O";
huangxin committed
466
    }},
huangxin committed
467 468 469 470 471 472 473
    // async change() {
    //   if (this.model.bodgrp.rec.focflg === "X") {
    //     this.model.setmod.redamt = this.model.setmod.docamt;
    //   } else {
    //     this.model.setmod.redamt = "0.00";
    //   }
    // },
474
    async multipleSelect(selection) {
huangxin committed
475 476 477 478 479 480 481 482 483 484 485
            if (selection.length > 1) {
                this.$notify({
                    title: "error",
                    message: "You cannot select more than one tenor",
                    type: "error",
                });
            } else {
                let chkIds;
                if (selection.length === 0) {
                    chkIds = [];
                    this.model.liaall.tensetstm.rows = [];
huangxin committed
486
                    this.flag1=true;
huangxin committed
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
                } else {
                    chkIds = [selection[0] + 1];
                }
                //
                console.log(this.model.liaall.tensetstm);
                let params = { chkDst: "liaall.tenstm", chkIds };
                console.log(params);
                const rtnmsg = await this.executeRule("liaall.tenstm", params);
                console.log(rtnmsg);
                if (rtnmsg.respCode == SUCCESS) {
                    this.updateModel(rtnmsg.data);
                } else {
                    this.$notify.error({ title: "错误", message: "服务请求失败!" });
                }
            }
        },
huangxin committed
503 504 505 506
  },

  created: function () {},
};
jxl committed
507 508 509
</script>
<style>
</style>