import Api from '~/service/Api'; import commonFunctions from '~/mixin/commonFunctions.js'; import moment from "moment"; import Utils from "~/utils"; import Pts from '~/components/business/commonModel/Pts'; export default { mixins: [commonFunctions], methods: { rcvdatChange(){ if(this.model.bedgrp.rec.rcvdat == null || this.model.bedgrp.rec.rcvdat === ''){ this.model.bedgrp.rec.rcvdat = moment(new Date()).format("YYYY-MM-DD"); } if(this.model.bedgrp.rec.doctypcod ==='E'){ this.model.bedgrp.rec.rcvdat = ''; } }, // model.bedgrp.rec.docprbrol change, re-calculate PRB docprbrolChange() { // re-calculate PRB // store the ref let ref = this.model.bedgrp.prb.pts.ref; switch (this.model.bedgrp.rec.docprbrol) { case "BEN": Utils.copyValueFromVoData(this.model.bedgrp.prb.pts, this.model.ledgrp.ben.pts); break; case "A2B": Utils.copyValueFromVoData(this.model.bedgrp.prb.pts, this.model.ledgrp.a2b.pts); break; case "PRB": this.model.bedgrp.prb.pts = new Pts().data; break; } this.model.bedgrp.prb.pts.ref = ref; // 设置prb的rol if(this.model.bedgrp.prb.pts.extkey!=''){ this.model.bedgrp.prb.pts.rol = "PRB"; } }, }, };