import { split } from "lodash";
import Api from "~/service/Api"
import Utils from "~/utils/index"
export default {
    async onUsfmodShwflt() {
        let rtnmsg = await this.executeRule("usfmod_shwflt")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

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

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

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

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

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败！' });
        }
    },
    async continueEdit(row) {
        //let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}})
        //if (rtnmsg.respCode == SUCCESS) {
        //var cacheFileName = rtnmsg.data.cacheFileName;
        debugger;
        // let viewurl = "/business/ditopn?selsptinr=" + row[0];
        let viewurl = "/business/ditopn?selsptinr=" + row['INR'];
        this.$router.push(viewurl);
        //}
    },
    async handleReset() {
        this.model.chkinc = "";
        this.model.chkdzt = "";
        this.model.chkpen = "";
        this.model.chkcor = "";
        this.model.chkaut = "";
        this.model.chkdel = "";
        this.model.chktco = "";
        this.model.chkcan = "";
        this.model.selobj = "";
        this.model.seltxt = "";
        this.model.usfmod.flt = "";
        this.model.inidatfro = "";
        this.model.inidattil = "";
        this.model.dflg = "1";
        this.model.chkypt = "";
        this.model.yptinf = "";

    },
    async handleSearch() {
            this.executeDefault("sptstm").then(res => {
                //TODO 处理数据逻辑
                this.stmData.data = res.data.sptstm.rows;
            })
        }

}