Commit 7398e903 authored by zhengke's avatar zhengke

修改

parent 2a55e048
......@@ -473,7 +473,11 @@
},
//减法 得实收
getShiShou(num1, num2) {
return parseInt(num1) - parseInt(num2);
if(num1&&num2){
return parseInt(num1) - parseInt(num2);
}else{
return 0;
}
},
//跳转到订单详情
goOrderDetail(path, item) {
......
......@@ -517,42 +517,4 @@ export function apipost(cmd, msg, successCall, faildCall, isOnline){
successCall(res);
}
}, faildCall)
}
//文件下载
export function GetLocalFile(cmd, msg, fileName, newCmd, successCall){
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetPostData(cmd, msg, newCmd);
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
}
// export function GetLocalFile = function (cmd, msg, fileName, newCmd, successCall) {
// var apiurl = this.domainManager().DomainUrl + cmd;
// var postData = this.GetPostData(cmd, msg, newCmd);
// this.$http.post(apiurl, postData, {
// responseType: 'arraybuffer'
// }).then((res) => {
// let blob = new Blob([res.data], {
// type: "application/vnd.ms-excel"
// })
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// link.setAttribute("download", fileName);
// document.body.appendChild(link);
// link.click();
// successCall(res);
// }).catch(function (res) {});
// }
}
\ No newline at end of file
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