Browse Source

销售出库单调整,订单查询去掉单据状态。

master
yibo 7 years ago
parent
commit
1f54ca503d
10 changed files with 350 additions and 41 deletions
  1. +2
    -1
      app.json
  2. +0
    -18
      pages/order/query/query.js
  3. +0
    -9
      pages/order/query/query.wxml
  4. +8
    -10
      pages/outStore/outStore.js
  5. +1
    -1
      pages/outStore/outStoreDetail/outStoreDetail.js
  6. +2
    -2
      pages/outStore/outStoreDetail/outStoreDetail.wxss
  7. +193
    -0
      pages/outStore/query/query.js
  8. +3
    -0
      pages/outStore/query/query.json
  9. +47
    -0
      pages/outStore/query/query.wxml
  10. +94
    -0
      pages/outStore/query/query.wxss

+ 2
- 1
app.json View File

@ -23,7 +23,8 @@
"pages/specialOrderApplication/creatNewSpecialOrder/creatNewSpecialOrder",
"pages/outStore/outStore",
"pages/outStore/outStoreDetail/outStoreDetail",
"pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail"
"pages/specialOrderApplication/specialOrderApplyDetail/specialOrderApplyDetail",
"pages/outStore/query/query"
],
"window": {
"backgroundTextStyle": "light",


+ 0
- 18
pages/order/query/query.js View File

@ -35,17 +35,6 @@ Page({
currency: [],
Sdate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
Edate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
billIndex:0,
billState:[
{
ID:0,
Name:"未审核"
},
{
ID: 20,
Name: "已审核"
}
]
},
/**
@ -95,11 +84,6 @@ Page({
*/
onReachBottom: function () {
},
choseBillState:function(e){
this.setData({
billIndex: e.detail.value
})
},
bindSDateChange: function (e) {
this.setData({
@ -123,8 +107,6 @@ Page({
app.globalData.selectStartDate = sDate;
app.globalData.selectEndDate = eDate;
app.globalData.selectBillState = this.data.billState[this.data.billIndex].ID
wx.navigateBack({
delta: 1
})


+ 0
- 9
pages/order/query/query.wxml View File

@ -24,15 +24,6 @@
</picker>
</view>
<view class='twoitem'>
<text>单据状态</text>
<picker class='item_value' mode="selector" range="{{billState}}" value='{{billIndex}}' bindchange="choseBillState" range-key="{{'Name'}}">
<view class="picker">
{{billState[billIndex].Name}}
</view>
</picker>
</view>
<button class='submit' catchtap='submitForm'>提交</button>


+ 8
- 10
pages/outStore/outStore.js View File

@ -8,7 +8,7 @@ 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 method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 0,
"PageIndex": PageIndex,
@ -43,7 +43,7 @@ function setTimeN(that) {
}
function getListY(that, PageIndex, PageSize, Customer_ID, StartDate, EndDate) {
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 20,
"PageIndex": PageIndex,
@ -96,12 +96,11 @@ Page({
},
onShow: function () {
/*
var that = this;
this.setData({
Customer_ID: app.globalData.SaleOutCustomer_ID,
StartDate: app.globalData.SaleOutStartDate,
EndDate: app.globalData.SaleOutEndDate
Customer_ID: app.globalData.selectCustomer_ID,
StartDate: app.globalData.selectStartDate,
EndDate: app.globalData.selectEndDate
})
PageIndexN = 0
PageSizeN = 10
@ -110,7 +109,6 @@ Page({
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);
});
*/
},
@ -143,7 +141,7 @@ Page({
var that = this;
PageIndexN = PageIndexN + 1;
PageSizeN = 10;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 0,
"PageIndex": PageIndexN,
@ -170,7 +168,7 @@ Page({
var that = this;
PageIndexY = PageIndexY + 1;
PageSizeY = 10;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/SaleOutStoreRpc/GetSaleOutStore';
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStore';
let params = [{
"BillState": 20,
"PageIndex": PageIndexY,
@ -218,7 +216,7 @@ Page({
chose: function (e) {
wx.navigateTo({
url: '/pages/SaleOutStoreChose/SaleOutStoreChose',
url: 'query/query',
})
}
})

+ 1
- 1
pages/outStore/outStoreDetail/outStoreDetail.js View File

@ -16,7 +16,7 @@ Page({
var detailItemID = parseInt(options.ID);
let arrayLast = [];
let totalMoney = 0;
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/CustomerRpc/SaleOutStoreRpc/GetSaleOutStoreDetail';
let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStoreDetail';
let params = [detailItemID];
network.transfer_request(method, params, function (res) {
var array = res.result;


+ 2
- 2
pages/outStore/outStoreDetail/outStoreDetail.wxss View File

@ -19,7 +19,7 @@
position: absolute;
width: 100%;
/* height: 100%; */
top: 100rpx;
top: 60rpx;
text-align: center;
}
@ -27,7 +27,7 @@
position: absolute;
width: 100%;
/* height: 100%; */
top: 150rpx;
top: 120rpx;
text-align: center;
}


+ 193
- 0
pages/outStore/query/query.js View File

@ -0,0 +1,193 @@
var network = require("../../../utils/net.js")
var timechage = require("../../../utils/dateTimeUtil.js")
var app = getApp()
function GetCustomer(that, inputValue) {
let method = "/MainSystem/B3MiniProgramRpc/Rpcs/BaseInfoRpc/GetCustomerExt";
let params = [{
"InputValue": inputValue,
"PageIndex": 0,
"PageSize": 100
}];
network.transfer_request(method, params, function (res) {
that.setData({
currency: res.result,
customer: res.result
})
})
that.setData({
which: "购货客户"
})
}
Page({
/**
* 页面的初始数据
*/
data: {
customerIndex: 0,
customer: [{
ID: 0,
Name: "请选择购货客户"
}],
currency: [],
Sdate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
Edate: timechage.formatTimeTwo(Date.parse(new Date()), 'Y-M-D'),
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
bindSDateChange: function (e) {
this.setData({
Sdate: e.detail.value
})
},
bindEDateChange: function (e) {
this.setData({
Edate: e.detail.value
})
},
submitForm: function (e) {
let customerID = this.data.customer[this.data.customerIndex].ID;
let sDate = timechage.formatymdERTDate(this.data.Sdate);
let eDate = timechage.formatymdERTDate(this.data.Edate);
if (customerID == 0) {
app.globalData.selectCustomer_ID = null;
} else {
app.globalData.selectCustomer_ID = customerID;
}
app.globalData.selectStartDate = sDate;
app.globalData.selectEndDate = eDate;
wx.navigateBack({
delta: 1
})
},
powerDrawer: function (e) {
let that = this;
let x = e.currentTarget.dataset.x;
if (x == "购货客户") {
GetCustomer(that, "")
}
let currentStatu = e.currentTarget.dataset.statu;
this.util(currentStatu)
},
itemclick: function (e) {
var that = this;
var name = e.currentTarget.dataset.name;
var id = e.currentTarget.dataset.id;
var which = e.currentTarget.dataset.item;
var idx = e.currentTarget.dataset.idx;
if (which == "购货客户") {
that.setData({
customerIndex: idx
})
}
this.setData({
showModalStatus: false,
})
},
select: function (e) {
var that = this;
var which = e.currentTarget.dataset.item;
var value = e.detail.value;
if (which == "购货客户") {
GetCustomer(that, value)
}
},
util: function (currentStatu) {
/* 动画部分 */
// 第1步:创建动画实例
var animation = wx.createAnimation({
duration: 200, //动画时长
timingFunction: "linear", //线性
delay: 0 //0则不延迟
});
// 第2步:这个动画实例赋给当前的动画实例
this.animation = animation;
// 第3步:执行第一组动画
animation.opacity(0).rotateX(-100).step();
// 第4步:导出动画对象赋给数据对象储存
this.setData({
animationData: animation.export()
})
// 第5步:设置定时器到指定时候后,执行第二组动画
setTimeout(function () {
// 执行第二组动画
animation.opacity(1).rotateX(0).step();
// 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
this.setData({
animationData: animation
})
//关闭
if (currentStatu == "close") {
this.setData({
showModalStatus: false,
});
}
}.bind(this), 200)
// 显示
if (currentStatu == "open") {
// 调用函数时,传入new Date()参数,返回值是日期和时间
// 再通过setData更改Page()里面的data,动态更新页面的数据
this.setData({
showModalStatus: true,
});
}
}
})

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

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

+ 47
- 0
pages/outStore/query/query.wxml View File

@ -0,0 +1,47 @@
<!--pages/outStore/query/query.wxml-->
<view class='twoitem'>
<text>购货客户</text>
<text class='item_value' bindtap="powerDrawer" data-statu="open" data-x='购货客户' data-item='{{which}}'>{{customer[customerIndex].Name}}</text>
</view>
<view class='twoitem'>
<text>开始日期</text>
<picker class='item_value' mode="date" value="{{Sdate}}" start="2018-01-01" end="2037-12-31" bindchange="bindSDateChange">
<view class="picker">
{{Sdate}}
</view>
</picker>
</view>
<view class='twoitem'>
<text>结束日期</text>
<picker class='item_value' mode="date" value="{{Edate}}" start="2018-01-01" end="2037-12-31" bindchange="bindEDateChange">
<view class="picker">
{{Edate}}
</view>
</picker>
</view>
<button class='submit' catchtap='submitForm'>提交</button>
<view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>
<!--content-->
<!--使用animation属性指定需要执行的动画-->
<view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}">
<!--drawer content-->
<view class='top' data-item='{{which}}'>
<input data-item='{{which}}' class="sousuo" bindinput="select" placeholder='请输入搜索'>
</input>
</view>
<view class="drawer_content">
<block wx:for="{{currency}}" wx:key="item" wx:for-index="idx">
<view class="grid1" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'>
<text class='text3'>{{item.Name}}</text>
</view>
</block>
</view>
<view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
</view>

+ 94
- 0
pages/outStore/query/query.wxss View File

@ -0,0 +1,94 @@
/* pages/outStore/query/query.wxss */
page {
background: rgb(240, 239, 245);
}
.twoitem{
display: flex;
flex-direction: row;
justify-content: space-between;
padding-right: 5%;
padding-left: 5%;
background: #fff;
border-bottom: 1rpx solid #dbdbdb;
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.item_value{
width: 70%;
text-align: right
}
.submit {
margin-top: 50rpx;
margin-bottom: 30rpx;
}
.drawer_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #000;
opacity: 0.5;
overflow: hidden;
}
.sousuo {
/* margin-right: 10%;
margin-left: 10%; */
text-align: center;
background: #d6d8da;
height: 40px;
font-size: 28rpx;
}
.drawer_content {
height: 500rpx;
overflow-y: scroll; /*超出父盒子高度可滚动*/
}
.drawer_box {
width: 650rpx;
overflow: hidden;
position: fixed;
top: 50%;
left: 0;
z-index: 1001;
background: #fafafa;
margin: -150px 50rpx 0 50rpx;
border-radius: 3px;
}
.btn_ok {
padding: 10px;
font: 20px "microsoft yahei";
text-align: center;
border-top: 1px solid #e8e8ea;
color: #2788f8;
}
.top {
height: 20%;
justify-content: center;
align-items: center;
}
.grid1 {
width: 100%;
border-bottom: 1px solid #c3c3c3;
/* padding-top: 5px;
padding-bottom: 10px; */
padding-top: 16rpx;
padding-bottom: 16rpx;
text-align: center;
}
.text3 {
font-size: 18px;
color: rgb(48, 48, 48);
}

Loading…
Cancel
Save