Setp.vue 15.5 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
        <c-checkbox v-model="model.bodgrp.rec.focflg" @change="change"
huangxin committed
299 300 301 302 303
          >Free of Payment</c-checkbox
        >
      </c-col>
      <c-col :span="12">
        <el-form-item label="Reduction Amt." prop="setmod.doccur">
jxl committed
304 305
          <c-select
            disabled
huangxin committed
306
            v-model="model.setmod.doccur"
jxl committed
307 308 309 310 311 312 313 314 315 316 317
            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
318
        </el-form-item>
huangxin committed
319 320
      </c-col>
      <c-col :span="12">
jxl committed
321 322
        <el-form-item
          style="text-align: left"
323
          label-width="5px"
huangxin committed
324
          prop="setmod.redamt"
jxl committed
325
        >
huangxin committed
326
          <c-input
huangxin committed
327
            :disabled="model.bodgrp.rec.focflg == 'X'"
huangxin committed
328
            v-model="model.setmod.redamt"
jxl committed
329 330
            style="text-align: left; width: 100%"
            placeholder="请输入Reduction Amt"
huangxin committed
331 332
            @keyup.enter.native="showGridPromptDialog('setmod.redamt')"
          ></c-input>
jxl committed
333
        </el-form-item>
huangxin committed
334 335
      </c-col>
      <c-col :span="24">
huangxin committed
336
        <c-checkbox
huangxin committed
337
          :disabled="model.setmod.docamt < model.bodgrp.cbs.opn1.amt"
huangxin committed
338
          v-model="model.mtabut.clsflg"
huangxin committed
339 340 341
          >Close Contract</c-checkbox
        >
      </c-col>
jxl committed
342

huangxin committed
343 344
      <c-col :span="12">
        <el-form-item label="Settle Amt." prop="setmod.doccur">
jxl committed
345 346
          <c-select
            disabled
huangxin committed
347
            v-model="model.setmod.doccur"
jxl committed
348 349 350 351 352 353 354 355 356 357 358 359
            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
360 361
      </c-col>
      <c-col :span="12">
jxl committed
362 363
        <el-form-item
          style="text-align: left"
364
          label-width="5px"
huangxin committed
365
          prop="setmod.docamt"
jxl committed
366
        >
huangxin committed
367
          <c-input
huangxin committed
368
            v-model="model.setmod.docamt"
jxl committed
369 370
            style="text-align: left; width: 100%"
            placeholder="请输入Settle Amt."
huangxin committed
371 372 373
            @change="change1"
            @keyup.enter.native="showGridPromptDialog('setmod.docamt')"
          ></c-input>
jxl committed
374
        </el-form-item>
huangxin committed
375
      </c-col>
jxl committed
376 377
    </c-col>

huangxin committed
378
    <c-col :span="24" style="height: 24px; margin-top: 20px">
379 380 381 382 383 384 385
      <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">
386
      <c-table :data="model.bptbck.bptbckg" style="width: 100%">
387 388 389 390 391 392 393 394 395 396
        <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
397
  </c-row>
jxl committed
398 399
</template>
<script>
huangxin committed
400
import Api from "~/service/Api";
wangren committed
401
import commonProcess from "~/mixin/commonProcess";
huangxin committed
402 403
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Botset/Event";
jxl committed
404 405

export default {
huangxin committed
406 407 408 409 410 411
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      stmData: {
412 413 414 415 416 417
        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',
418
          //'6 6 "Mat.Dat." 250 4 7 1',
huangxin committed
419 420 421 422 423 424 425 426 427 428 429
          {
            index: 6,
            position: 6,
            width: 250,
            render: (item, scope) => {
              return scope.row[item.prop] === "null"
                ? ""
                : scope.row[item.prop];
            },
            label: "Mat.Dat.",
          },
430 431
        ],
        data: [],
huangxin committed
432 433 434 435
      },
    };
  },
  computed: {
436
    clsflg: {
437
      get() {
huangxin committed
438
        return this.model.mtabut.clsflg === "X";
439 440
      },
      set(val) {
huangxin committed
441
        this.model.mtabut.clsflg = val ? "x" : "";
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
      },
    },
    focflg: {
      get() {
        return this.model.bedgrp.rec.focflg === "X";
      },
      set(val) {
        this.model.bedgrp.rec.focflg = val ? "X" : "";
      },
    },
    flag() {
      return this.model.mtabut.coninf.usr.extkey == "";
    },
  },
  mounted() {
    this.$nextTick(() => {});
  },
jxl committed
459

huangxin committed
460 461 462 463 464 465 466
// watch:{
//         "model.setmod.docamt":function(){
//             if(this.model.bodgrp.cbs.opn1.amt==this.model.setmod.docamt){
//             this.model.mtabut.clsflg = "X";
//     }
//         },
//       },
huangxin committed
467 468
  methods: {
    ...Event,
huangxin committed
469 470 471 472
    async change1(){
      if(this.model.bodgrp.cbs.opn1.amt==this.model.setmod.docamt){
            this.model.mtabut.clsflg = "X";
    }},
huangxin committed
473 474 475
    async change() {
      if (this.model.bodgrp.rec.focflg === "X") {
        this.model.setmod.redamt = this.model.setmod.docamt;
huangxin committed
476 477
        // let rtnmsg = await this.executeDefault("setmod.redamt");
        // this.model.bodgrp.rec.docsta ="D"
huangxin committed
478 479
      } else {
        this.model.setmod.redamt = "0.00";
huangxin committed
480 481
        // let rtnmsg = await this.executeDefault("setmod.redamt");
        // this.model.bodgrp.rec.docsta = rtnmsg.data.bodgrp_rec_docsta;
huangxin committed
482 483
      }
    },
484
    async multipleSelect(selection) {
huangxin committed
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
      if (selection.length > 1) {
        this.$notify({
          title: "error",
          message: "You cannot select more than one tenor",
          type: "error",
        });
      } else {
        let selIds;
        if (selection.length === 0) {
          this.$notify({
          title: "error",
          message: "Please select at least one tenor",
          type: "error",
        });
          selIds = [];
          this.model.setmod.docamt = "0.000";
          this.isDisabled = false;
        } else {
          selIds = [selection[0] + 1];
          this.model.setmod.docamt = this.model.bodgrp.cbs.max.amt;
          this.isDisabled = true;
        }
507 508 509 510 511 512
        let params = { selDst: "liaall.tenstm", selIds };
        const rtnmsg = await this.executeRule("liaall.tenstm", params);
        if (rtnmsg.respCode == SUCCESS) {
          this.updateModel(rtnmsg.data);
        } else {
          this.$notify.error({ title: "错误", message: "服务请求失败!" });
jxl committed
513
        }
514 515
      }
    },
huangxin committed
516 517 518 519
  },

  created: function () {},
};
jxl committed
520 521 522
</script>
<style>
</style>