import Api from '~/service/Api'; import commonFunctions from '~/mixin/commonFunctions.js'; import Utils from "~/utils"; import Pts from '~/components/business/commonModel/Pts'; export default { mixins: [commonFunctions], methods: { //索赔编号 queryOwnref () { let params = this.model.ncdgrp.rec if (!this.model.ncdgrp.ben.pts.ptainr) { return } let ptainr = this.model.ncdgrp.ben.pts.ptainr; const loading = this.loading(); Api.post(`/business/ref/ncd?ptaInr=${ptainr}`, params).then(res => { loading.close(); if (res.respCode == SUCCESS) { this.model.ncdgrp.rec.ownref = res.data; } }).catch(() => { loading.close(); }); }, clearPresentdet() { if (this.model.ncdgrp.rec.demstat != "INCP") { this.model.ncdgrp.blk.presentdet = ""; } }, changeMaxamt(){ if(this.model.ncdgrp.cbs.max.amt=='' || this.model.ncdgrp.cbs.max.amt=='0'){ this.model.ncdgrp.cbs.max.amt = this.model.nidgrp.cbs.max.amt; } this.calcName(); }, //向索人--"ncdgrp.rec.payrol" calcOth() { switch (this.model.ncdgrp.rec.payrol) { case "APL": Utils.copyValueFromVoData(this.model.ncdgrp.oth.pts, this.model.nidgrp.apl.pts); this.model.ncdgrp.oth.pts.rol = "OTH"; break; case "ADA": Utils.copyValueFromVoData(this.model.ncdgrp.oth.pts, this.model.nidgrp.ada.pts); this.model.ncdgrp.oth.pts.rol = "OTH"; break; case "ISS": Utils.copyValueFromVoData(this.model.ncdgrp.oth.pts, this.model.ncdgrp.iss.pts); this.model.ncdgrp.oth.pts.rol = "OTH"; break; case "OTH": this.model.ncdgrp.oth.pts = new Pts().data; this.model.ncdgrp.oth.pts.rol = "OTH"; break; } }, //索赔当事人--"ncdgrp.rec.docprbrol" calcPrb() { console.log("this.model.ncdgrp.rec.docprbrol-->" + this.model.ncdgrp.rec.docprbrol); switch (this.model.ncdgrp.rec.docprbrol) { case "BEN": Utils.copyValueFromVoData(this.model.ncdgrp.prb.pts, this.model.nidgrp.ben.pts); this.model.ncdgrp.prb.pts.rol = "PRB"; break; case "ATB": Utils.copyValueFromVoData(this.model.ncdgrp.prb.pts, this.model.nidgrp.atb.pts); this.model.ncdgrp.prb.pts.rol = "PRB"; break; case "AT2": Utils.copyValueFromVoData(this.model.ncdgrp.prb.pts, this.model.nidgrp.at2.pts); this.model.ncdgrp.prb.pts.rol = "PRB"; break; default: this.model.ncdgrp.prb.pts = new Pts().data; this.model.ncdgrp.prb.pts.rol = "PRB"; break; } }, }, };