Event.js 7.01 KB
Newer Older
1
import { split } from "lodash";
liuxin committed
2
import Api from "~/service/Api"
liuxin committed
3
import Utils from "~/utils/index"
liuxin committed
4
export default {
5 6
    async onUsfmodShwflt() {
        let rtnmsg = await this.executeRule("usfmod_shwflt")
潘际乾 committed
7
        if (rtnmsg.respCode == SUCCESS) {
8
            //TODO 处理数据逻辑
liuxin committed
9

10 11 12 13
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
liuxin committed
14
    },
liushikai committed
15 16
    async onTake() {
        let rtnmsg = await this.executeRule("take")
潘际乾 committed
17
        if (rtnmsg.respCode == SUCCESS) {
18
            //TODO 处理数据逻辑
liuxin committed
19

20 21 22 23
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
liuxin committed
24
    },
hulei committed
25 26 27
    async onDelete(idx,row) {
        let params = {selDst:"sptstm",selIds:[idx+1]}
        let rtnmsg = await this.executeRule("del",params)
潘际乾 committed
28
        if (rtnmsg.respCode == SUCCESS) {
hulei committed
29
            this.stmData.data = rtnmsg.data.sptstm.rows;
liushikai committed
30
            this.$store.commit("setTaskList", {key: "sptbrk", val: this.stmData.data.length});
hulei committed
31
            this.$notify({ title: '成功', message: '删除成功!' });
32 33
        }
        else {
hulei committed
34
            this.$notify.error({ title: '错误', message: '删除失败!' });
35
        }
liuxin committed
36
    },
liushikai committed
37 38
    async onRouting() {
        let rtnmsg = await this.executeRule("routing")
潘际乾 committed
39
        if (rtnmsg.respCode == SUCCESS) {
40
            //TODO 处理数据逻辑
liuxin committed
41

42 43 44 45
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
liuxin committed
46
    },
liushikai committed
47 48 49 50 51 52 53 54 55 56
    async onShowInc() {
        let rtnmsg = await this.executeRule("show_inc")
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑

        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
    },
liushikai committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    async onDetails(idx, row) {
        let viewurl = "business/sptpopup";
        const selIds= [idx + 1];
        const selDst= "sptstm";
        let params = {selIds,selDst};
        this.executeRule("sptstm,butspt",params).then((res) => {
            if (res.respCode == SUCCESS) {
                Utils.copyValueFromVO(this.model, res.data);
                sessionStorage.setItem('Sptpopup', JSON.stringify(this.model));
                this.$router.push({ path: viewurl, query: {}});
            }else {
                this.$notify.error({ title: '错误', message: '服务请求失败!' });
            }
        })
        /* let rtnmsg = await this.executeRule("details")
潘际乾 committed
72
        if (rtnmsg.respCode == SUCCESS) {
73 74 75
            //TODO 处理数据逻辑
        }
        else {
liushikai committed
76
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
liushikai committed
77
        } */
liushikai committed
78
    },
liuxin committed
79
    async continueEdit(row, scope) {
80
        //let rtnmsg = await Api.post("getPendingData",{params:{'selsptinr':row[0]}})
潘际乾 committed
81
        //if (rtnmsg.respCode == SUCCESS) {
82
        //var cacheFileName = rtnmsg.data.cacheFileName;
83
        this.model.selsptinr = row['INR'];
liuxin committed
84 85 86 87
        const selIds = [];
        selIds.push(row['IDX']);
        let params = { selDst: "sptstm", selIds: selIds };
        let rtnmsg = await this.executeRule("tak", params)
88 89 90 91 92 93 94 95 96 97 98
        if (rtnmsg.respCode == SUCCESS) {
            //TODO 处理数据逻辑
            let trnName = row.交易代码.toLowerCase();
            // let viewurl = "/business/ditopn?selsptinr=" + row[0];
            //let viewurl = "/business/"+trnName+"?selsptinr=" + row['INR'];
            let viewurl = "/business/"+trnName;
            this.$router.push(viewurl);
        }
        else {
            this.$notify.error({ title: '错误', message: '服务请求失败!' });
        }
99
     
100
       
wangguangchao committed
101
        //}
fukai committed
102
    },
103
    async handleReset() {
liushikai committed
104 105 106 107 108 109 110 111 112 113 114 115 116
        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 = "";
liushikai committed
117
        this.model.dflg = "1";
liushikai committed
118 119
        this.model.chkypt = "";
        this.model.yptinf = "";
fukai committed
120

121 122
    },
    async handleSearch() {
123
            if(this.sourceModel.length===0){
liushikai committed
124 125 126
                this.sourceData.forEach(s => {
                    this.model[s.value] = 't';
                  })
127
            }
liushikai committed
128 129 130
           const res = await this.executeDefault("sptstm")
           //TODO 处理数据逻辑
           this.stmData.data = res.data.sptstm.rows;
131
           this.$store.commit("setTaskList", {key: "sptsel", val: this.stmData.data.length});
liushikai committed
132 133 134 135 136 137 138
        //    if(res.data.sptstm.rows.length == 0){
        //     this.$notify({
        //         title: '成功',
        //         message: '搜索完毕,无满足条件记录',
        //         type: 'success'
        //     });
        //     }
wangguangchao committed
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
        },

        async sptfndHandleReset() {
            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 sptfndHandleSearch() {
                this.model.chkpen = "t";
liushikai committed
162 163 164 165 166 167
                // this.executeDefault("sptstm").then(res => {
                //     //TODO 处理数据逻辑
                //     this.stmData.data = res.data.sptstm.rows;
                // })
                const res = await this.executeDefault("sptstm")
                this.stmData.data = res.data.sptstm.rows;
168
                this.$store.commit("setTaskList", {key: "sptbrk", val: this.stmData.data.length});
liushikai committed
169 170 171 172 173 174 175
                // if(res.data.sptstm.rows.length == 0){
                //     this.$notify({
                //         title: '成功',
                //         message: '搜索完毕,无满足条件记录',
                //         type: 'success'
                //     });
                //     }
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
            },
            async onSptpButord(){
                let rtnmsg = await this.executeRule("sptp.butord")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

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

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

liuxin committed
202
}