Commit 169f77e6 authored by 黄奎's avatar 黄奎
parents 4a28f818 b92f7282
...@@ -1502,6 +1502,7 @@ export default { ...@@ -1502,6 +1502,7 @@ export default {
}; };
}, },
created() { created() {
this.isTerminate = -1
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode; let ActionMenuCode = userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("F_AccountantFinanceMerge") != -1) { if (ActionMenuCode.indexOf("F_AccountantFinanceMerge") != -1) {
...@@ -2160,6 +2161,9 @@ export default { ...@@ -2160,6 +2161,9 @@ export default {
"Financial_post_GetPageList", "Financial_post_GetPageList",
this.msg, this.msg,
res => { res => {
if (this.msg.Conditon == 7) {
this.getMyRejectFinanceCount();
}
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = []; let data = [];
if (t == 1 && this.BOSSBtn && this.msg.Conditon == 3) { if (t == 1 && this.BOSSBtn && this.msg.Conditon == 3) {
...@@ -2197,9 +2201,7 @@ export default { ...@@ -2197,9 +2201,7 @@ export default {
'', '',
this.isTerminate, this.isTerminate,
); );
if (this.msg.Conditon == 7) {
this.getMyRejectFinanceCount();
}
}, },
financeRemove(id) { financeRemove(id) {
//作废 //作废
......
...@@ -345,6 +345,21 @@ export default { ...@@ -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, { this.$http.post(apiurl, postData, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
...@@ -362,20 +377,7 @@ export default { ...@@ -362,20 +377,7 @@ export default {
successCall(res); successCall(res);
} }
}, faildCall) }, 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