// pages/homePage/homePage.js
|
|
|
|
var network = require("../../utils/net.js")
|
|
function GetUserProfile(successtion) {
|
|
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetUserProfile';
|
|
let params = [];
|
|
|
|
network.transfer_request(method, params, function (res) {
|
|
successtion();
|
|
if (res.result.AccountingUnit_ID != null) {
|
|
app.globalData.accountingUnit_ID = res.result.AccountingUnit_ID;
|
|
app.globalData.accountingUnit_Name = res.result.AccountingUnit_Name
|
|
}
|
|
|
|
if (res.result.Department_ID != null) {
|
|
app.globalData.department_ID = res.result.Department_ID;
|
|
app.globalData.department_Name = res.result.Department_Name
|
|
}
|
|
})
|
|
}
|
|
|
|
Page({
|
|
data: {
|
|
|
|
},
|
|
|
|
onLoad: function (options) {
|
|
// GetUserProfile(function (res) {
|
|
|
|
// });
|
|
},
|
|
|
|
/**
|
|
* 点击页面按钮进行跳转
|
|
*/
|
|
transBtnClicked: function (event) {
|
|
var btnID = event.currentTarget.dataset.itemid;
|
|
var transferURL = '';
|
|
switch (btnID) {
|
|
// 找司机
|
|
case "1":
|
|
transferURL = '/pages/sendCargo/sendCargo';
|
|
break;
|
|
// 对账单
|
|
case "2":
|
|
transferURL = '/pages/statementOfAccount/statementOfAccount';
|
|
break;
|
|
// 订单
|
|
case "3":
|
|
transferURL = '/pages/orderInquiry/orderInquiry';
|
|
break;
|
|
// 销售出库
|
|
case "4":
|
|
transferURL = '/pages/saleOutStore/saleOutStore';
|
|
break;
|
|
// 担保单
|
|
case "5":
|
|
transferURL = '/pages/guarantee/guarantee';
|
|
break;
|
|
}
|
|
|
|
wx.navigateTo({
|
|
url: transferURL,
|
|
})
|
|
},
|
|
|
|
|
|
})
|