Commit 169f77e6 authored by 黄奎's avatar 黄奎
parents 4a28f818 b92f7282
......@@ -1502,6 +1502,7 @@ export default {
};
},
created() {
this.isTerminate = -1
let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("F_AccountantFinanceMerge") != -1) {
......@@ -2160,6 +2161,9 @@ export default {
"Financial_post_GetPageList",
this.msg,
res => {
if (this.msg.Conditon == 7) {
this.getMyRejectFinanceCount();
}
if (res.data.resultCode == 1) {
let data = [];
if (t == 1 && this.BOSSBtn && this.msg.Conditon == 3) {
......@@ -2197,9 +2201,7 @@ export default {
'',
this.isTerminate,
);
if (this.msg.Conditon == 7) {
this.getMyRejectFinanceCount();
}
},
financeRemove(id) {
//作废
......
......@@ -345,6 +345,21 @@ export default {
}
}
}
// 我的财务单防止多次请求导致数据混乱
if(isTerminate>0){
this.$http.interceptors.request.use(config => {
removePending(config); //在一个axios发送前执行一下取消操作
config.cancelToken = new cancelToken((c)=>{
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending.push({ u: config.url + '&' + config.method, f: c });
});
return Promise.resolve(config)
}, error => {
return Promise.reject(error)
})
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
......@@ -362,20 +377,7 @@ export default {
successCall(res);
}
}, faildCall)
if(isTerminate&&isTerminate>0){
this.$http.interceptors.request.use(config => {
removePending(config); //在一个axios发送前执行一下取消操作
config.cancelToken = new cancelToken((c)=>{
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending.push({ u: config.url + '&' + config.method, f: c });
});
return Promise.resolve(config)
}, error => {
return Promise.reject(error)
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment