import Api from "~/service/Api"
export default {
                onUsfmodShwflt(){
                this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
                    if(!valid)
                        return;
                    let rtnmsg = await Api.post("sptsel/usfmod_shwflt",{data:this.model})
                    if(rtnmsg.retcod == SUCCESS)
                    {
                        //TODO 处理数据逻辑

                    }
                    else
                    {
                       this.$notify.error({title: '错误',message: '服务请求失败！'});
                    }
                })
            },
        onButypt(){
                this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
                    if(!valid)
                        return;
                    let rtnmsg = await Api.post("sptsel/butypt",{data:this.model})
                    if(rtnmsg.retcod == SUCCESS)
                    {
                        //TODO 处理数据逻辑

                    }
                    else
                    {
                       this.$notify.error({title: '错误',message: '服务请求失败！'});
                    }
                })
            },
        onDlmft(){
                this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
                    if(!valid)
                        return;
                    let rtnmsg = await Api.post("sptsel/dlmft",{data:this.model})
                    if(rtnmsg.retcod == SUCCESS)
                    {
                        //TODO 处理数据逻辑

                    }
                    else
                    {
                       this.$notify.error({title: '错误',message: '服务请求失败！'});
                    }
                })
            },
        onDlaxq(){
                this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
                    if(!valid)
                        return;
                    let rtnmsg = await Api.post("sptsel/dlaxq",{data:this.model})
                    if(rtnmsg.retcod == SUCCESS)
                    {
                        //TODO 处理数据逻辑

                    }
                    else
                    {
                       this.$notify.error({title: '错误',message: '服务请求失败！'});
                    }
                })
            },
        onButimg(){
                this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
                    if(!valid)
                        return;
                    let rtnmsg = await Api.post("sptsel/butimg",{data:this.model})
                    if(rtnmsg.retcod == SUCCESS)
                    {
                        //TODO 处理数据逻辑

                    }
                    else
                    {
                       this.$notify.error({title: '错误',message: '服务请求失败！'});
                    }
                })
            },

}