import commonFunctions from '~/mixin/commonFunctions.js'; import moment from 'moment'; import Utils from "~/utils/index"; import Pts from '~/components/business/commonModel/Pts'; import Api from "~/service/Api"; export default { mixins: [commonFunctions], methods: { //获取卖方信用证单据编号 async onBftpButgetref() { let CR = "\n"; let ptainr = this.model.dedgrp.ben.pts.ptainr; let ownref = this.model.bfdgrp.rec.ownref; let trnName = "BFTSND" const loading = this.loading(); let res = await Api.post(`/Domlc/ref/bfd?ptaInr=${ptainr}&ownref=${ownref}&trnName=${trnName}`); loading.close(); if (res.respCode == SUCCESS) { this.model.bfdgrp.rec.ownref = res.data; this.model.bfdgrp.blk.setinsbe = this.model.bfdgrp.blk.setinsbe + CR + " 我行业务编号:" + this.model.bfdgrp.rec.ownref +" " + "国内信用证收汇"; } else { this.$message.error(res.respMsg); } }, calcPrb() { let ptsref = this.model.bfdgrp.prb.pts.ref; switch (this.model.bfdgrp.rec.docprbrol) { case "BEN": Utils.copyValueFromVoData(this.model.bfdgrp.prb.pts, this.model.dedgrp.ben.pts); this.model.bfdgrp.prb.rol = "PRB"; this.model.bfdgrp.prb.pts.rol = "PRB"; this.model.bfdgrp.prb.pts.extkey = this.model.dedgrp.ben.pts.extkey; this.model.bfdgrp.prb.pts.cnnam = this.model.dedgrp.ben.pts.cnnam; this.model.bfdgrp.prb.pts.cnadr = this.model.dedgrp.ben.pts.cnadr; break; case "PRB": this.model.bfdgrp.prb.pts = new Pts().data; this.model.bfdgrp.prb.rol = "PRB"; this.model.bfdgrp.prb.pts.rol = "PRB"; break; } if(ptsref!=""){ this.model.bfdgrp.prb.pts.ref = ptsref; } }, Defaultopn1(){ this.model.bfdgrp.cbs.opn1.amt = this.model.bfdgrp.cbs.max.amt; this.model.imgInvmod.docamt = this.model.bfdgrp.cbs.max.amt }, Onorddat(){ this.model.bfdgrp.rec.predat =this.model.bfdgrp.rec.orddat; } } }