Ovwp.vue 2.06 KB
<template>
	<div class="eibs-tab">
		<c-collapse v-model="activeNames" >
			<el-collapse-item title="Extend Usance" name="bcteus">
				<m-bcteus :model="model" :codes="codes" />
			</el-collapse-item>

      <el-collapse-item title="Liabilities" name="acceptlinep">
        <m-acceptlinep ref="setp" :model="model" :codes="codes" @changeMatdat="changeMatdat" />
      </el-collapse-item>

      <el-collapse-item title="Parties" name="ptyp">
				<m-ptyp :model="model" :codes="codes" />
			</el-collapse-item>
		</c-collapse>
	</div>
</template>

<script>
import Bcteus from "./Bcteus";
import Ptyp from "./Ptyp";
import event from "../event";
import AcceptLine from "~/components/business/engp/views/AcceptLine.vue";

export default {
  components: {
    "m-bcteus": Bcteus,
    "m-ptyp": Ptyp,
    "m-acceptlinep": AcceptLine,
  },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event],
  data() {
    return {
      activeNames: ["bcteus", "acceptlinep", "ptyp"]
    };
  },
  methods: {
    changeMatdat(matdat) {
      if (this.model.bcdgrp.rec.matdat !== matdat.matdat) {
        this.model.bcdgrp.rec.matdat = matdat.matdat
      }
      // if (this.model.bcdgrp.rec.matdat !== matdat) {
      //   let olddat = "";
      //   let newdat = "";
      //   if (this.model.bcdgrp.rec.matdat !== "") {
      //     olddat = moment(this.model.bcdgrp.rec.matdat).format("DD.MMMM.yyyy");
      //   }
      //   if (matdat !== "") {
      //     newdat = moment(matdat).format("DD.MMMM.yyyy");
      //   }
      //   let str =
      //     "Maturity for " +
      //     this.model.setmod.doccur +
      //     " " +
      //     this.model.setmod.docamt +
      //     " has been changed from " +
      //     olddat +
      //     " to " +
      //     newdat +
      //     "\n";
      //   this.model.strinf = str + this.root.oldStrinf;
      // }
      // this.model.bcdgrp.rec.matdat = matdat;
      // this.model.bcdgrp.rec.stadat = this.model.bcdgrp.rec.matdat - this.model.bcdgrp.rec.tenmaxday;
    },
  },
  created: function() {},
  computed: {}
};
</script>

<style scoped>
</style>