import Api from "~/service/Api"
import Utils from "~/utils/index"
export default {
    async onDitpButgetref() {
        let rtnmsg = await this.executeRule("ditp.butgetref")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.model.didgrp.rec.ownref = rtnmsg.data.didgrp_rec_ownref
            this.$message({
                type: 'success',
                message: '获取成功！'
            });
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onAplpDet() {
        let rtnmsg = await this.executeRule("ditp.aplp.det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            // console.log(rtnmsg.data);
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onBenpDet() {
        let rtnmsg = await this.executeRule("benp_det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onRevclauseButtxmsel() {
        let rtnmsg = await this.executeRule("revclause_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLcrgodButtxmsel() {
        let rtnmsg = await this.executeRule("lcrgod_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLcrdocButtxmsel() {
        let rtnmsg = await this.executeRule("lcrdoc_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onAdlcndButtxmsel() {
        let rtnmsg = await this.executeRule("adlcnd_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onInsbnkButtxmsel() {
        let rtnmsg = await this.executeRule("insbnk_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onRmbpDet() {
        let rtnmsg = await this.executeRule("rmbp_det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onDefdetButtxmsel() {
        let rtnmsg = await this.executeRule("defdet_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onPreperButtxmsel() {
        let rtnmsg = await this.executeRule("preper_buttxmsel")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onSetmodDet() {
        let rtnmsg = await this.executeRule("setmod.det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLiaallButmisamt() {
        let rtnmsg = await this.executeRule("liaall_butmisamt")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLiaallButmissig() {
        let rtnmsg = await this.executeRule("liaall_butmissig")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onWrkpDet() {
        let rtnmsg = await this.executeRule("wrkp_det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onOthpDet() {
        let rtnmsg = await this.executeRule("othp_det")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLimptsGet1() {
        let rtnmsg = await this.executeRule("limpts_get1")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLimptsGet2() {
        let rtnmsg = await this.executeRule("limpts_get2")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onLimmodTrycal() {
        let rtnmsg = await this.executeRule("limmod_trycal")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async onSeaParty(path) {
        let rtnmsg =  await this.executeRule(path) 
        if (rtnmsg.respCode == SUCCESS) {
            Utils.copyValueFromVO(this.model,rtnmsg.data);
        }

    },

    onSeainf() {
      

    },
    async BlurBennam(e) {
        let rtnmsg = await this.executeDefault("ditp.remark")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.model.ditp.remark = rtnmsg.data.ditp_remark
        }
    },
    async BlurAplname(e) {
        let rtnmsg = await this.executeDefault("ditp.remark")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.model.ditp.remark = rtnmsg.data.ditp_remark
        }
    },
    async BlurSignam(e) {
        let rtnmsg = await this.executeDefault("ditp.remark")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            this.model.ditp.remark = rtnmsg.data.ditp_remark
        }
    },
    async onExtkey(e) {

    },
    // didgrp.iss.pts.extkey
    async changeExtkey() {
        let rtnmsg = await this.executeRule("didgrp.iss.pts.extkey")
        if (rtnmsg.respCode == SUCCESS) {
            Utils.copyValueFromVO(this.model, rtnmsg.data);
        }
    }

}