You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

72 lines
1.7 KiB

// pages/homePage/homePage.js
var network = require("../../utils/net.js")
var timechage = require("../../utils/dateTimeUtil.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: {
currentDate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y/M/D'),
balance:"",
},
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,
})
},
})