Commit 899a31ec authored by zhengke's avatar zhengke

新增

parent a713a6c2
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -232,6 +232,21 @@ const routes = [{
component: () =>
import("pages/financial/financalDocument/addCapitalAllocation.vue")
},
{
path: "/financial/financalDocument/RecPayQuery", //收支查询
component: () =>
import("pages/financial/financalDocument/RecPayQuery.vue")
},
{
path: "/financial/financalDocument/FinancialDocuments", //我的财务单据
component: () =>
import("pages/financial/financalDocument/FinancialDocuments.vue")
},
{
path: "/financial/financalDocument/WorkEntrustmentMy", //工作委托
component: () =>
import("pages/financial/financalDocument/WorkEntrustmentMy.vue")
},
{
path: "/test", //API测试
component: () =>
......
......@@ -131,6 +131,42 @@ export default{
};
return obj;
},
//下载文件
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf();
var token = "";
var key = "";
var tokenData={};
var localStorage = window.localStorage["loginUserInfo"];
if (localStorage !== undefined && localStorage != 'undefined') {
tokenData = JSON.parse(localStorage);
}
token = tokenData.data.ErpToken;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
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) {});
},
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
......
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