yibo 7 years ago
parent
commit
46ef9e48d7
4 changed files with 32 additions and 26 deletions
  1. +1
    -1
      app.json
  2. +20
    -18
      pages/homePage/homePage.js
  3. +9
    -5
      pages/homePage/homePage.wxml
  4. +2
    -2
      pages/login/login.js

+ 1
- 1
app.json View File

@ -1,7 +1,7 @@
{ {
"pages": [ "pages": [
"pages/homePage/homePage",
"pages/login/login", "pages/login/login",
"pages/homePage/homePage",
"pages/saleForecastList/saleForecastList", "pages/saleForecastList/saleForecastList",
"pages/saleForecastList/Detail/Detail", "pages/saleForecastList/Detail/Detail",
"pages/saleForecastList/query/query", "pages/saleForecastList/query/query",


+ 20
- 18
pages/homePage/homePage.js View File

@ -4,20 +4,10 @@ var network = require("../../utils/net.js")
var timechage = require("../../utils/dateTimeUtil.js") var timechage = require("../../utils/dateTimeUtil.js")
function GetUserProfile(successtion) { function GetUserProfile(successtion) {
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetUserProfile';
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/AccountBalanceRpc/GetCurrentBalanceMoney';
let params = []; 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
}
network.requestLoading(method, params, function (res) {
successtion(res);
}) })
} }
@ -28,10 +18,16 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
var that = this;
// 添加接口请求当前余额 // 添加接口请求当前余额
// GetUserProfile(function (res) {
// });
GetUserProfile(function (res) {
console.log(res);
if (res != null) {
that.setData({
balance: res.result
});
}
});
}, },
/** /**
@ -49,9 +45,9 @@ Page({
case "2": case "2":
transferURL = '/pages/statementOfAccount/statementOfAccount'; transferURL = '/pages/statementOfAccount/statementOfAccount';
break; break;
// 订单
// 客户找车
case "3": case "3":
transferURL = '/pages/orderInquiry/orderInquiry';
transferURL = '/pages/sendCargo/sendCargo';
break; break;
// 销售出库 // 销售出库
case "4": case "4":
@ -61,6 +57,12 @@ Page({
case "5": case "5":
transferURL = '/pages/guarantee/guarantee'; transferURL = '/pages/guarantee/guarantee';
break; break;
case "6":
transferURL = '/pages/statementOfAccount/statementOfAccount';
break;
case "7":
transferURL = '/pages/homePage/homePage';
break;
} }
wx.navigateTo({ wx.navigateTo({


+ 9
- 5
pages/homePage/homePage.wxml View File

@ -8,34 +8,38 @@
<text class='totalMoney'>当前余额</text> <text class='totalMoney'>当前余额</text>
</view> </view>
<view class='balanceView'> <view class='balanceView'>
<text class='balance'>¥2032323{{balance}}</text>
<text class='balance'>¥{{balance}}</text>
</view> </view>
</image> </image>
</view> </view>
<view class="body-box"> <view class="body-box">
<view class="ico" catchtap='transBtnClicked' data-itemid='1'>
<!-- <view class="ico" catchtap='transBtnClicked' data-itemid='1'>
<image src="/imgs/saleForecast.png"></image> <image src="/imgs/saleForecast.png"></image>
<text class='text'>销售预报</text> <text class='text'>销售预报</text>
</view> </view>
<view class="ico" catchtap='transBtnClicked' data-itemid='2'> <view class="ico" catchtap='transBtnClicked' data-itemid='2'>
<image src="/imgs/orderList.png"></image> <image src="/imgs/orderList.png"></image>
<text class='text'>销售订单</text> <text class='text'>销售订单</text>
</view>
</view> -->
<view class="ico" catchtap='transBtnClicked' data-itemid='3'> <view class="ico" catchtap='transBtnClicked' data-itemid='3'>
<image src="/imgs/findDriver.png"></image> <image src="/imgs/findDriver.png"></image>
<text class='text'>客户找车</text> <text class='text'>客户找车</text>
</view> </view>
<view class="ico" catchtap='transBtnClicked' data-itemid='4'>
<!-- <view class="ico" catchtap='transBtnClicked' data-itemid='4'>
<image src="/imgs/saleOutStore.png"></image> <image src="/imgs/saleOutStore.png"></image>
<text class='text'>销售出库</text> <text class='text'>销售出库</text>
</view> </view>
<view class="ico" catchtap='transBtnClicked' data-itemid='5'> <view class="ico" catchtap='transBtnClicked' data-itemid='5'>
<image src="/imgs/customerCheck.png"></image> <image src="/imgs/customerCheck.png"></image>
<text class='text'>客户验收</text> <text class='text'>客户验收</text>
</view>
</view> -->
<view class="ico" catchtap='transBtnClicked' data-itemid='6'> <view class="ico" catchtap='transBtnClicked' data-itemid='6'>
<image src="/imgs/statementOfAccount.png"></image> <image src="/imgs/statementOfAccount.png"></image>
<text class='text'>客户对账</text> <text class='text'>客户对账</text>
</view> </view>
<view class="ico" catchtap='transBtnClicked' data-itemid='7'>
<image src="/imgs/arrearsRecord.png"></image>
<text class='text'>欠款单</text>
</view>
</view> </view>

+ 2
- 2
pages/login/login.js View File

@ -52,7 +52,7 @@ function IsBindWeixinMP(phone) {
// res.result = false; // res.result = false;
if (res.result == true) { if (res.result == true) {
wx.switchTab({ wx.switchTab({
url: '/pages/information/information',
url: '/pages/homePage/homePage',
}) })
} else { } else {
wx.showModal({ wx.showModal({
@ -189,7 +189,7 @@ Page({
// 绑定客户服务器 // 绑定客户服务器
bindCustomerPreviousURL: function(successaction) { bindCustomerPreviousURL: function(successaction) {
var method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/AccountRpc/QinBindByPhone';
var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Customer/AccountRpc/XuBindByPhone';
var previousParams = [{ var previousParams = [{
OpenId: openid, OpenId: openid,
Phone: app.globalData.Phone, Phone: app.globalData.Phone,


Loading…
Cancel
Save