default.js 2.14 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
import commonFunctions from '~/mixin/commonFunctions.js';
import commonDepend from "~/mixin/commonDepend";
import Utils from "~/utils/index";
import Pts from '~/components/business/commonModel/Pts';
export default {
	mixins: [commonFunctions, commonDepend],
	methods: {
    defaultInvamt(){
      if(!this.model.bfdgrp.rec.invamt){
      this.model.bfdgrp.rec.invamt = this.model.dedgrp.cbs.opn1.amt;
      }
      },
    defaultDoctypcod(){
      if(this.model.bfdgrp.rec.doctypcod!='D'){
        this.model.bfdgrp.rec.matdat=null;
      }
    },
    Onavbnam(){
      if(this.model.dedgrp.rec.avbwth == "O"){
        if(!this.model.dedgrp.blk.avbwthtxt){
          this.model.dedgrp.avbnam = "Any Bank"
        }else{
          this.model.dedgrp.avbnam = this.model.dedgrp.blk.avbwthtxt
        }
      }else{
        this.model.dedgrp.avbnam = this.model.dedgrp.avb.pts.jigomc
      }
    },
    getDocprbrolList() {
			let docprbrolList = []
			//------------docprbrolList-------------------
			if (this.model.dedgrp.ben.pts.ptainr != "") {
				var benobj = new Object();
				benobj.label = "Beneficiary(BEN)";
				benobj.value = this.model.dedgrp.ben.pts.rol;
				docprbrolList.push(benobj);
			}
			var prbobj = new Object();
			prbobj.label = "Presenter(PRB)";
			prbobj.value = "PRB";
			docprbrolList.push(prbobj);
			this.$set(this.codes, 'docprbrolList', docprbrolList)
			if (this.model.bfdgrp.rec.docprbrol == "") {
				if (this.model.dedgrp.ben.pts.ptainr != "") {
					this.model.bfdgrp.rec.docprbrol = "BEN";
				}
				this.calcPrb();
			}
    },
    payrol(){
      this.model.bfdgrp.rec.payrol = "ISS";
      Utils.copyValueFromVoData(this.model.bfdgrp.oth.pts, this.model.dedgrp.iss.pts);
      this.model.bfdgrp.oth.rol = "OTH";
      this.model.bfdgrp.oth.pts.rol = "OTH";
    },
    defaultDoctypcod(){
      this.model.bfdgrp.rec.doctypcod = this.model.dedgrp.rec.avbby;
    },
    defaultMaxamt(){
      if(this.model.bfdgrp.cbs.max.amt==0){
        this.model.bfdgrp.cbs.max.amt = this.model.dedgrp.cbs.opn1.amt;
      }
      this.Defaultopn1();
		},
		//初始化发票核验
		invchk(){
			this.model.imgInvmod.docamt = this.model.bfdgrp.cbs.max.amt
		}
	},
}