Browse Source

创建出库单页面

master
chenxuhui 7 years ago
parent
commit
ad9c58d9eb
7 changed files with 426 additions and 4 deletions
  1. +2
    -1
      app.json
  2. +2
    -2
      pages/guarantee/selectbill/selectbill.js
  3. +1
    -1
      pages/homePage/homePage.js
  4. +248
    -0
      pages/outStore/outStore.js
  5. +3
    -0
      pages/outStore/outStore.json
  6. +55
    -0
      pages/outStore/outStore.wxml
  7. +115
    -0
      pages/outStore/outStore.wxss

+ 2
- 1
app.json View File

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


+ 2
- 2
pages/guarantee/selectbill/selectbill.js View File

@ -95,8 +95,8 @@ Page({
customerid = Number(options.customerid)
var that = this;
getBillForDetail777(that, customerid)
getBillForDetail792(that, customerid)
getBillForDetail776(that, customerid)
// getBillForDetail792(that, customerid)
// getBillForDetail776(that, customerid)
},
/**


+ 1
- 1
pages/homePage/homePage.js View File

@ -52,7 +52,7 @@ Page({
break;
// 销售出库
case "4":
transferURL = '/pages/myCars/myCars';
transferURL = '/pages/outStore/outStore';
break;
// 担保单
case "5":


+ 248
- 0
pages/outStore/outStore.js View File

@ -0,0 +1,248 @@
// pages/outStore/outStore.js
var app = getApp()
var network = require("../../utils/net.js")
var timechage = require("../../utils/dateTimeUtil.js")
var PageIndexN = 0
var PageSizeN = 10
var PageIndexY = 0
var PageSizeY = 10
function getListN(that, PageIndex, PageSize, Customer_ID, StartDate, EndDate, successaction) {
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 0,
"PageIndex": PageIndex,
"PageSize": PageSize,
"Customer_ID": Customer_ID,
"StartDate": StartDate,
"EndDate": EndDate
}];
network.transfer_request(method, params, function (res) {
successaction();
that.setData({
arrayNN: res.result
})
setTimeN(that)
})
}
function setTimeN(that) {
let array = [];
for (var i = 0; i < that.data.arrayNN.length; i++) {
var dmo = {
ID: that.data.arrayNN[i].ID,
Money: that.data.arrayNN[i].Money,
Customer_Name: that.data.arrayNN[i].Customer_Name,
LoadTime: timechage.formatTimeTwo(that.data.arrayNN[i].LoadTime.substring(6, 19), 'Y-M-D')
}
array.push(dmo);
}
that.setData({
arrayN: array
})
}
function getListY(that, PageIndex, PageSize, Customer_ID, StartDate, EndDate) {
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 20,
"PageIndex": PageIndex,
"PageSize": PageSize,
"Customer_ID": Customer_ID,
"StartDate": StartDate,
"EndDate": EndDate
}];
network.transfer_request(method, params, function (res) {
that.setData({
arrayYY: res.result
})
setTimeY(that)
})
}
function setTimeY(that) {
let array = [];
for (var i = 0; i < that.data.arrayYY.length; i++) {
var dmo = {
ID: that.data.arrayYY[i].ID,
Money: that.data.arrayYY[i].Money,
Customer_Name: that.data.arrayYY[i].Customer_Name,
LoadTime: timechage.formatTimeTwo(that.data.arrayYY[i].LoadTime.substring(6, 19), 'Y-M-D')
}
array.push(dmo);
}
that.setData({
arrayY: array
})
}
Page({
/**
* 页面的初始数据
*/
data: {
winWidth: 0,
winHeight: 0,
// tab切换
currentTab: 0,
arrayN: [1,2,3,4,5,6,7,7,7,8,8,8,8,1],
arrayY: [1, 2, 3, 4, 5, 6, 7, 7, 7, 8, 8, 8, 8, 1],
arrayNN: [],
arrayYY: [],
Customer_ID: null,
StartDate: null,
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;
this.setData({
Customer_ID: app.globalData.SaleOutCustomer_ID,
StartDate: app.globalData.SaleOutStartDate,
EndDate: app.globalData.SaleOutEndDate
})
PageIndexN = 0
PageSizeN = 10
PageIndexY = 0
PageSizeY = 10
getListN(that, PageIndexN, PageSizeN, this.data.Customer_ID, this.data.StartDate, this.data.EndDate, function (res) {
getListY(that, PageIndexY, PageSizeY, that.data.Customer_ID, that.data.StartDate, that.data.EndDate);
});
*/
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
PageIndexN = 0
PageSizeN = 10
PageIndexY = 0
PageSizeY = 10
this.setData({
arrayN: [],
arrayY: [],
arrayNN: [],
arrayYY: []
})
app.globalData.SaleOutCustomer_ID = null
app.globalData.SaleOutStartDate = null
app.globalData.SaleOutEndDate = null
},
upperN: function (e) {
var that = this;
PageIndexN = 0
PageSizeN = 10
getListN(that, PageIndexN, PageSizeN, this.data.Customer_ID, this.data.StartDate, this.data.EndDate, function (res) { })
},
lowerN: function (e) {
var that = this;
PageIndexN = PageIndexN + 1;
PageSizeN = 10;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 0,
"PageIndex": PageIndexN,
"PageSize": PageSizeN,
"Customer_ID": that.data.Customer_ID,
"StartDate": that.data.StartDate,
"EndDate": that.data.EndDate
}];
network.transfer_request(method, params, function (res) {
let addarry = that.data.arrayNN.concat(res.result)
that.setData({
arrayNN: addarry
})
setTimeN(that)
})
},
upperY: function (e) {
var that = this;
PageIndexY = 0
PageSizeY = 10
getListY(that, PageIndexY, PageSizeY, this.data.Customer_ID, this.data.StartDate, this.data.EndDate)
},
lowerY: function (e) {
var that = this;
PageIndexY = PageIndexY + 1;
PageSizeY = 10;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 20,
"PageIndex": PageIndexY,
"PageSize": PageSizeY,
"Customer_ID": that.data.Customer_ID,
"StartDate": that.data.StartDate,
"EndDate": that.data.EndDate
}];
network.transfer_request(method, params, function (res) {
let addarry = that.data.arrayYY.concat(res.result)
that.setData({
arrayYY: addarry
})
setTimeY(that)
})
},
/**
* 滑动切换tab
*/
bindChange: function (e) {
var that = this;
that.setData({
currentTab: e.detail.current
});
},
/**
* 点击tab切换
*/
swichNav: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
itemclickN: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreInfo/SaleOutStoreInfo?ID=' + e.currentTarget.dataset.data.ID,
})
},
itemclickY: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreInfo/SaleOutStoreInfo?ID=' + e.currentTarget.dataset.data.ID,
})
},
chose: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreChose/SaleOutStoreChose',
})
}
})

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

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

+ 55
- 0
pages/outStore/outStore.wxml View File

@ -0,0 +1,55 @@
<!--pages/outStore/outStore.wxml-->
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">未审核</view>
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">已审核</view>
</view>
<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 83}}px" bindchange="bindChange">
<!-- 未审核 -->
<swiper-item class="swiper-items">
<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='itemview_h'>
<text class='text_id'>No.{{item.ID}}</text>
<text class='text_id'>金额:{{item.Money}}</text>
</view>
<view class='itemview_h1'>
<text class='text_name'>{{item.Customer_Name}}</text>
<text class='text_name'>发货日期:{{item.LoadTime}}</text>
</view>
</view>
<view class='view_line_main'>
<view class='view_line'></view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<!-- 已审核 -->
<swiper-item class="swiper-items">
<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='itemview_h'>
<text class='text_id'>No.{{item.ID}}</text>
<text class='text_id'>金额:{{item.Money}}</text>
</view>
<view class='itemview_h1'>
<text class='text_name'>{{item.Customer_Name}}</text>
<text class='text_name'>发货日期:{{item.LoadTime}}</text>
</view>
</view>
<view class='view_line_main'>
<view class='view_line'></view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
<view class='chose' catchtap='chose'>筛选</view>

+ 115
- 0
pages/outStore/outStore.wxss View File

@ -0,0 +1,115 @@
/* pages/outStore/outStore.wxss */
page {
background: rgb(240, 239, 245);
}
.swiper-tab {
width: 100%;
/* border-bottom: 2rpx solid #777; */
text-align: center;
line-height: 80rpx;
background: white;
display: flex;
flex-direction: row;
justify-content: space-around;
border-bottom: 0.2rpx solid rgb(236, 231, 231);
}
.swiper-tab-list {
font-size: 30rpx;
/* display: inline-block; */
width: 25%;
color: #777;
}
.on {
color: #2788f8;
border-bottom: 1.5rpx solid #2E8CF5;
}
.swiper-box {
display: block;
width: 100%;
overflow: hidden;
margin-top: 10rpx;
}
.swiper-items {
height: 100%;
}
.scroll-views {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.custmer_list_view{
display: flex;
flex-direction: column;
padding-left: 4%;
padding-top: 16rpx;
background: white;
}
.itemview_h{
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 5rpx;
padding-right: 4%;
padding-bottom: 5rpx;
}
.itemview_h1{
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 5rpx;
padding-right: 4%;
padding-bottom: 16rpx;
}
.text_name{
font-size: 28rpx;
color: rgb(136, 136, 136);
}
.text_id{
font-size: 32rpx;
color: rgb(48, 48, 48);
}
.view_line_main{
background: white
}
.view_line{
width: 96%;
height: 2rpx;
margin-left: 4%;
background: rgb(219, 219, 219);
}
.chose{
width: 100%;
height: 50rpx;
position: fixed;
bottom: 0rpx;
background: white;
border-top: 0.5px solid #e0e0e0;
border-bottom: 0.5px solid #e0e0e0;
padding-top: 20rpx;
padding-bottom: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}

Loading…
Cancel
Save