default.js 1.34 KB
/**
 * Nctcan Default规则
 */
import moment from 'moment';

export default {
    methods: {
        defaultRule() {
            this.model.mtabut.clsflgp = "X";
            this.model.ncdgrp.rec.clsdat = new Date();
            // 暂时设置默认值为N
						// if(this.model.rebkpflg == ''){
						// 	this.model.rebkpflg = 'N';
						// }
        },
        // clearExpdatValues() {
        //   if (this.model.ncdgrp.rec.expflg == 'X') {
        //     this.model.ncdgrp.rec.clmdat = ""
        //     this.model.addbcb.bccls1 = 'Y'
        //   }
        //   if (this.model.ncdgrp.rec.expflg == '') {
        //     this.model.addbcb.bccls1 = 'N'
        //   }
        // },
        // compareData() {
        //   if (moment(this.model.ncdgrp.rec.clmdat).diff(moment(this.model.ncdgrp.rec.opndat), 'days') < 0 && moment(this.model.ncdgrp.rec.clmdat).diff(moment(this.model.ncdgrp.rec.inudat), 'days') < 0) {
        //     this.model.ncdgrp.rec.clmdat = this.model.ncdgrp.rec.opndat
        //   }
        //   this.model.addbcb.clmdat = this.model.ncdgrp.rec.clmdat
        //   if (this.model.ncdgrp.rec.hndtyp == 'OC' && this.model.ncdgrp.rec.liaflg == "") {
        //     this.model.ncdgrp.rec.liadat = moment(this.model.ncdgrp.rec.clmdat).add(14, 'day').format('YYYY-MM-DD')
        //   }
        // },
    }
}
//你可以添加自动default处理