Commit c8685c68 authored by Mac's avatar Mac

1

parent d1d12806
......@@ -3,7 +3,8 @@
<div class="el-card__header">
<span>损益核算</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button>
<!---->
<el-button type="primary" class="el-button--small" @click="getDateList,getSupplierList">导出全部</el-button>
</div>
</div>
......@@ -131,7 +132,7 @@
},
methods:{
getDateList(){
console.log('进入方法')
if(this.value!=''){
this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1];
......@@ -142,6 +143,7 @@
this.msg.SupplierId= 0
}
this.loading=true;
console.log('11111111')
this.mallapipost("/api/Statistics/GetOrderProfitLossList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
......@@ -154,6 +156,7 @@
})
},
getSupplierList(){//获取供应商接口
console.log("222222")
this.mallapipost("/api/Supplier/GetSupplierAllList", {}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
......
......@@ -234,7 +234,11 @@ export default {
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('clientConfirm') === -1 && this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1 && this.$route.name.indexOf('TravelContractConfirm') === -1 && this.$route.name.indexOf('ViittoContractConfirm') === -1 ) {
if (this.$route.name.indexOf('login') === -1 && this.$route.name.indexOf('clientConfirm') === -1
&& this.$route.name.indexOf('confirmationOrderDownLoad') === -1 && this.$route.name.indexOf('PrintPage') === -1
&& this.$route.name.indexOf('TravelContractConfirm') === -1 && this.$route.name.indexOf('ViittoContractConfirm') === -1
&& this.$route.name.indexOf('OrderProfitLossList') === -1
) {
let previousPathInfo = {
path: this.$route.name,
......@@ -335,7 +339,7 @@ export default {
//HTTP提交数据
Vue.prototype.mallapipost = function(cmd, msg, successCall, faildCall, isOnline) {
console.log('进入方法1')
var apiurl = this.domainManager().mallUrl + cmd;
var postData = this.GetPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
......@@ -345,15 +349,16 @@ export default {
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
console.log("res",res);
// if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
// // this.$router.push({
// // path: '/login'
// // });
// } else if (res.resultCode == 10005) {
// this.$router.go(-1);
// } else {
// successCall(res);
// }
}, faildCall)
}
//获取请求参数
......@@ -361,7 +366,7 @@ export default {
if (msg == null || msg == "") {
msg = {}
}
console.log('进入方2')
var timestamp = (new Date()).valueOf();
// if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" &&
// this.$route.path.toLowerCase() != "/login" &&
......@@ -384,9 +389,10 @@ export default {
// TenantId = this.getLocalStorage().TenantId;
// EmpId = this.getLocalStorage().EmpId;
// }
console.log('进入方法3')
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
......@@ -413,6 +419,7 @@ export default {
// OpenId:"ow_7I5ZQKhAB66yvOTGI35Xk-Kmg",
// UserId:19992,
}
return postData
},
......
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