index.js 1.27 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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import Default from "../model/default";
import Utils from "~/utils/index";
export default {
	mixins: [commonFunctions,Default],
	methods: {
		rejtypeChange(){
			this.rejtypeFlg = true;
		},
		rejpeninsChange(){
			this.rejpeninsFlg = true;
		},
		advdocflgChange(){
			if(this.model.bddgrp.rec.advdocflg=='X'){
				if (!this.rejtypeFlg) {
					this.model.rejtype = "1";
				}
			}
			else{
				this.model.expmno="";
			}
			if(!this.rejpeninsFlg){
				if(this.model.bddgrp.rec.advdocflg=="X"){
					this.model.rejpenins="";
				}
				else{
					this.model.rejpenins="X";
				}
			}
		},
		async getDisdoc(){
			let uil = "EN";
			if(this.model.didgrp.rec.elcflg=='Y'){
				uil = "CN";
			}
			if(this.model.bddgrp.rec.bilpro!=""){
				let data = {
					bilpro: this.model.bddgrp.rec.bilpro,
					uil: uil
				}
				let res = await Api.post('/Domlc/bdtdcrRule/getDisdoc', data);
				if (res.respCode == "AAAAAA") {
					this.model.bddgrp.blk.disdoc = res.data.disdoc
				}
			}
			else{
				this.model.bddgrp.blk.disdoc = "";
			}
		},
		disdocflgChange(){
			if(this.model.bddgrp.blk.disdocflg==""&&this.model.bddgrp.rec.bilpro==""){
                this.model.bddgrp.blk.disdoc="";
            }
		}
	}
}