Browse Source

1、添加出库单详情页面

2、修复预报列表下拉回调函数
master
chenxuhui 7 years ago
parent
commit
d320fdf003
8 changed files with 273 additions and 32 deletions
  1. +2
    -1
      app.json
  2. +4
    -28
      pages/outStore/outStore.js
  3. +2
    -2
      pages/outStore/outStore.wxml
  4. +93
    -0
      pages/outStore/outStoreDetail/outStoreDetail.js
  5. +3
    -0
      pages/outStore/outStoreDetail/outStoreDetail.json
  6. +42
    -0
      pages/outStore/outStoreDetail/outStoreDetail.wxml
  7. +124
    -0
      pages/outStore/outStoreDetail/outStoreDetail.wxss
  8. +3
    -1
      pages/saleForecastList/saleForecastList.js

+ 2
- 1
app.json View File

@ -21,7 +21,8 @@
"pages/customerChooseTemplate/customerChooseTemplate",
"pages/specialOrderApplication/specialOrderApplication",
"pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder",
"pages/outStore/outStore"
"pages/outStore/outStore",
"pages/outStore/outStoreDetail/outStoreDetail"
],
"window": {
"backgroundTextStyle": "light",


+ 4
- 28
pages/outStore/outStore.js View File

@ -81,8 +81,7 @@ Page({
* 页面的初始数据
*/
data: {
winWidth: 0,
winHeight: 0,
winHeight: app.globalData.winHeight,
// tab切换
currentTab: 0,
@ -96,25 +95,6 @@ Page({
EndDate: null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
/**
* 获取系统信息
*/
wx.getSystemInfo({
success: function (res) {
that.setData({
winWidth: res.windowWidth,
winHeight: res.windowHeight
});
}
});
},
onShow: function () {
/*
var that = this;
@ -230,16 +210,12 @@ Page({
})
}
},
itemclickN: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreInfo/SaleOutStoreInfo?ID=' + e.currentTarget.dataset.data.ID,
})
},
itemclickY: function (e) {
itemclick: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreInfo/SaleOutStoreInfo?ID=' + e.currentTarget.dataset.data.ID,
url: 'outStoreDetail/outStoreDetail?ID=' + e.currentTarget.dataset.data.ID,
})
},
chose: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreChose/SaleOutStoreChose',


+ 2
- 2
pages/outStore/outStore.wxml View File

@ -11,7 +11,7 @@
<scroll-view scroll-x="false" scroll-y="true" bindscrolltoupper="upperN" class='scroll-views' bindscrolltolower="lowerN">
<view class="custmer_list">
<view class="custmer_list_view_main" wx:for="{{arrayN}}" wx:key="item">
<view class='custmer_list_view' catchtap='itemclickN' data-Data='{{item}}'>
<view class='custmer_list_view' catchtap='itemclick' data-Data='{{item}}'>
<view class='itemview_h'>
<text class='text_id'>No.{{item.ID}}</text>
<text class='text_id'>金额:{{item.Money}}</text>
@ -34,7 +34,7 @@
<scroll-view scroll-x="false" scroll-y="true" class='scroll-views' bindscrolltoupper="upperY" bindscrolltolower="lowerY">
<view class="custmer_list">
<view class="custmer_list_view_main" wx:for="{{arrayY}}" wx:key="item">
<view class='custmer_list_view' catchtap='itemclickY' data-Data='{{item}}'>
<view class='custmer_list_view' catchtap='itemclick' data-Data='{{item}}'>
<view class='itemview_h'>
<text class='text_id'>No.{{item.ID}}</text>
<text class='text_id'>金额:{{item.Money}}</text>


+ 93
- 0
pages/outStore/outStoreDetail/outStoreDetail.js View File

@ -0,0 +1,93 @@
// pages/outStore/outStoreDetail/outStoreDetail.js
var network = require("../../../utils/net.js");
Page({
data: {
dataArr: [],
balance: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
var detailItemID = parseInt(options.ID);
let arrayLast = [];
let totalMoney = 0;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail';
let params = [detailItemID];
network.transfer_request(method, params, function (res) {
var array = res.result;
for (var i = 0; i < array.length; i++) {
if (array[i].Money) {
totalMoney = totalMoney + parseFloat(array[i].Money);
}
var dmo = {
goodsName: array[i].Goods_Name,
goodsMoney: array[i].Money,
goodsNum: array[i].Number,
goodsPrice: array[i].Price,
}
arrayLast.push(dmo);
}
if (!totalMoney) {
totalMoney = 0;
}
that.setData({
dataArr: arrayLast,
balance: totalMoney,
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

+ 3
- 0
pages/outStore/outStoreDetail/outStoreDetail.json View File

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "出库单详情"
}

+ 42
- 0
pages/outStore/outStoreDetail/outStoreDetail.wxml View File

@ -0,0 +1,42 @@
<!--pages/outStore/outStoreDetail/outStoreDetail.wxml-->
<view class='imageView'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='totalMoneyView'>
<text class='totalMoney'>总金额</text>
</view>
<view class='balanceView'>
<text class='balance'>¥{{balance}}</text>
</view>
</image>
</view>
<view class='listContainer'>
<scroll-view scroll-x="false" scroll-y="true" class='scrollView'>
<block wx:for="{{dataArr}}" wx:for-item="item">
<template is="outStoreDetailTemplate" data="{{item}}" />
</block>
</scroll-view>
</view>
<template name="outStoreDetailTemplate">
<view class='listItem'>
<view class='topView'>
<view class='goodsNameView'>
<text>{{item.goodsName}}</text>
</view>
<view class='priceView'>
<text>单价:{{item.goodsPrice}}</text>
</view>
</view>
<view class='bottomView'>
<view class='goodsNum'>
<text class='goodsNumText'>数量:{{item.goodsNum}}</text>
</view>
<view class='goodsMoney'>
<text class='goodsMoneyText'>金额:{{item.goodsMoney}}</text>
</view>
</view>
</view>
</template>

+ 124
- 0
pages/outStore/outStoreDetail/outStoreDetail.wxss View File

@ -0,0 +1,124 @@
/* pages/outStore/outStoreDetail/outStoreDetail.wxss */
.imageView {
height: 150px;
margin-top: 10px;
margin-left: 15px;
margin-right: 15px;
margin-bottom: 10px;
position: relative;
align-items: center;
}
.currentImage {
width: 100%;
height: 100%;
}
.totalMoneyView {
position: absolute;
width: 100%;
/* height: 100%; */
top: 100rpx;
text-align: center;
}
.balanceView {
position: absolute;
width: 100%;
/* height: 100%; */
top: 150rpx;
text-align: center;
}
.totalMoney {
color: white;
font-size: 20px;
}
.balance {
color: white;
font-size: 30px;
}
.listContainer {
width: 100%;
/* height: 100%; */
height: calc(100% - 170px);
display: flex;
flex-direction: column;
}
.scrollView{
height: 100%;
}
.listItem {
/* width: 100%; */
height: 150rpx;
display: flex;
flex-direction: column;
background-color: #fff;
padding: 0 20rpx 20rpx 20rpx;
border-bottom: 1rpx solid #ddd;
background: white;
}
.topView{
height: 50%;
width: 100%;
display: flex;
flex-direction: row;
padding-top: 20rpx;
}
.goodsNameView {
height: 100%;
width: 50%;
}
.priceView{
/* padding-right: 20px; */
height: 100%;
width: 50%;
text-align: right;
}
.bottomView {
height: 50%;
width: 100%;
display: flex;
flex-direction: row;
padding-top: 20rpx;
}
.goodsNum {
height: 100%;
width: 50%;
/* padding-top: 20rpx; */
}
.goodsNumText {
font-size: 16px;
color: #666;
}
.goodsMoney {
height: 100%;
width: 50%;
/* padding-right: 20px; */
text-align: right;
}
.goodsMoneyText {
font-size: 16px;
color: #666;
}
page {
background-color: #f0eff5;
height: 100%;
width: 100%;
}

+ 3
- 1
pages/saleForecastList/saleForecastList.js View File

@ -182,7 +182,9 @@ Page({
unCheckedScrollLower: function (event) {
var that = this;
UnCheckPageIndex = UnCheckPageIndex + 1;
getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize);
getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function (res){
});
},
//已审核订单滑动到底部加载


Loading…
Cancel
Save