default.js 1.15 KB
Newer Older
fukai committed
1 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 31 32 33 34
import commonFunctions from '~/mixin/commonFunctions.js';
import commonDepend from "~/mixin/commonDepend";
export default {
	mixins: [commonFunctions, commonDepend],
	methods: {
		getAddamtflg(){
			if (this.model.ledgrp.cbs.max2.amt > 0) {
			  this.model.letp.addamtflg = "X";
			} else {
			  this.model.letp.addamtflg = "";
			}
		 },
		 getAvbnam(){
			 if (this.model.ledgrp.rec.avbwth === 'O') {
			   if (this.model.ledgrp.blk.avbwthtxt === '') {
				 let localCodes = localStorage.getItem('localCodes');
				 if (localCodes) {
					 let avbwthTxts = JSON.parse(localCodes)['AVBWTH_EN_COD'];
					 if (avbwthTxts) {
					   let avbwthTxt = avbwthTxts.filter(m => m.value === 'O');
					   if (avbwthTxt && avbwthTxt.length > 0) {
						 this.model.avbnam = avbwthTxt.label;
					   }
					 }
				 }
			   } else {
				 this.model.avbnam = this.model.ledgrp.blk.avbwthtxt;
			   }
			 } else {
			   this.model.avbnam = this.model.ledgrp.avb.pts.nam ? this.model.ledgrp.avb.pts.nam : this.model.ledgrp.avb.pts.ennam ? this.model.ledgrp.avb.pts.ennam :this.model.ledgrp.avb.pts.cnnam ? this.model.ledgrp.avb.pts.cnnam :this.model.ledgrp.avb.pts.adrblk;
			 }
		 },
	},
}