diff --git a/pages/order/order.js b/pages/order/order.js
index f812bbc..05ad1d1 100644
--- a/pages/order/order.js
+++ b/pages/order/order.js
@@ -1,156 +1,170 @@
// pages/order/order.js
-var app = getApp();
-var network = require("../../utils/net.js")
-var timechage = require("../../utils/dateTimeUtil.js")
-var PageIndex = 0
+const app = getApp();
+var network = require("../../utils/net.js");
+var timechage = require("../../utils/dateTimeUtil.js");
var PageSize = 10
+var UnCheckPageIndex = 0
+var CheckedPageIndex = 0
var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList'
-function getList(that, PageIndex, PageSize) {
- let method = getListPath
+// 未审核订单列表
+function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) {
+ let getArr = [];
+ let method = getListPath;
let params = [{
- "BillState": app.globalData.selectBillState,
+ "BillState": 0,
"StartLoadTime": app.globalData.selectStartDate,
"EndLoadTime": app.globalData.selectEndDate,
"Customer_ID": app.globalData.selectCustomer_ID,
- "PageIndex": PageIndex,
- "PageSize": PageSize
+ "PageIndex": UnCheckPageIndex,
+ "PageSize": PageSize,
}];
- network.transfer_request(method, params, function(res) {
+ network.transfer_request(method, params, function (res) {
+ successaction();
+ var array = res.result;
+ if (array.length <= 0) {
+ wx.showToast({
+ title: '无数据更新',
+ })
+ UnCheckPageIndex = UnCheckPageIndex - 1;
+ return;
+ }
+ for (var i = 0; i < array.length; i++) {
+ var dmo = {
+ orderState: true,
+ workFlowName: array[i].DepartmentWorkFlow_Detail_Name,
+ orderID: array[i].ID,
+ Customer_Name: array[i].Customer_Name,
+ time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19), 'Y/M/D')
+ }
+ getArr.push(dmo);
+ }
+ let arrLast = that.data.unCheckDataArr.concat(getArr);
that.setData({
- arry: res.result
+ unCheckDataArr: arrLast,
})
- setColor(that)
})
}
-function setColor(that) {
- let array = [];
- for (var i = 0; i < that.data.arry.length; i++) {
- var color = "";
- if (that.data.arry[i].BillState == "未审核") {
- color = "rgb(231,20,20)"
- } else if (that.data.arry[i].BillState == "已审核") {
- color = "rgb(136,136,136)"
+// 已审核订单列表
+function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) {
+
+ let getArr = [];
+ let method = getListPath;
+ let params = [{
+ "BillState": 20,
+ "StartLoadTime": app.globalData.selectStartDate,
+ "EndLoadTime": app.globalData.selectEndDate,
+ "Customer_ID": app.globalData.selectCustomer_ID,
+ "PageIndex": CheckedPageIndex,
+ "PageSize": PageSize,
+ }];
+ network.transfer_request(method, params, function (res) {
+ var array = res.result;
+ if (array.length <= 0) {
+ wx.showToast({
+ title: '无数据更新',
+ })
+ CheckedPageIndex = CheckedPageIndex - 1;
+ return;
}
- var dmo = {
- Customer_Name: that.data.arry[i].Customer_Name,
- LoadTime: timechage.formatTimeTwo(that.data.arry[i].LoadTime.substring(6, 19), 'Y/M/D h:m'),
- BillState: that.data.arry[i].BillState,
- ID: that.data.arry[i].ID,
- DepartmentWorkFlow_Detail_Name: that.data.arry[i].DepartmentWorkFlow_Detail_Name,
- color: color,
- Money: that.data.arry[i].Money,
- Number: that.data.arry[i].Number
- };
- array.push(dmo);
- }
- that.setData({
- array: array
+ for (var i = 0; i < array.length; i++) {
+ var dmo = {
+ //添加单据状态的传递,在详情页面判断此值,进行是否允许提交的操作
+ orderState: false,
+ workFlowName: array[i].DepartmentWorkFlow_Detail_Name,
+ orderID: array[i].ID,
+ Customer_Name: array[i].Customer_Name,
+ time: timechage.formatTimeTwo(array[i].LoadTime.substring(6, 19),'Y/M/D')
+ }
+ getArr.push(dmo);
+ }
+ let arrLast = that.data.checkedDataArr.concat(getArr);
+ that.setData({
+ checkedDataArr: arrLast,
+ })
})
}
Page({
- /**
- * 页面的初始数据
- */
data: {
- array: [],
- arry: [],
- scrollTop: 0,
- scrollHeight: 0,
+ checkedDataArr: [],
+ unCheckDataArr: [],
winHeight: app.globalData.winHeight,
+ currentTab: 0,
},
/**
- * 生命周期函数--监听页面加载
+ * 滑动切换tab
*/
- onLoad: function(options) {
+ bindChange: function (e) {
var that = this;
- PageIndex = 0
- PageSize = 10
- getList(that, PageIndex, PageSize)
- },
+ that.setData({
+ currentTab: e.detail.current
+ });
+ },
/**
- * 生命周期函数--监听页面初次渲染完成
+ * 点击tab切换
*/
- onReady: function() {
-
+ swichNav: function (e) {
+ var that = this;
+ if (this.data.currentTab === e.target.dataset.current) {
+ return false;
+ } else {
+ that.setData({
+ currentTab: e.target.dataset.current
+ })
+ }
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
-
- },
+ this.setData({
+ checkedDataArr: [],
+ unCheckDataArr: [],
+ })
+ var that = this;
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function() {
+ UnCheckPageIndex = 0;
+ CheckedPageIndex = 0;
+ getUnCheckOrderList(that, UnCheckPageIndex, PageSize, function (res) {
+ getCheckedOrderList(that, CheckedPageIndex, PageSize);
+ });
+
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
- PageIndex = 0
+
PageSize = 10
- this.setData({
- array: [],
- arry: []
- })
app.globalData.selectCustomer_ID = null
app.globalData.selectStartDate = null
app.globalData.selectEndDate = null
- app.globalData.selectBillState = 0
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
-
- },
- onReachBottom: function() {
-
},
- refesh: function() {
- console.log('00000-----------')
+
+ //未审核订单滑动到底部加载
+ unCheckedScrollLower: function (event) {
var that = this;
- PageIndex = 0;
- PageSize = 10;
- getList(that, PageIndex, PageSize)
- wx.stopPullDownRefresh() //停止下拉刷新
+ UnCheckPageIndex = UnCheckPageIndex + 1;
+ getUnCheckOrderList(that, UnCheckPageIndex, PageSize, function (res) {
+
+ });
},
- //未审核订单滑动到底部加载
- scrollLower: function(event) {
- console.log('111111-----------')
+
+ //已审核订单滑动到底部加载
+ checkedScrollLower: function (event) {
var that = this;
- PageIndex = PageIndex + 1;
- PageSize = 10;
- let method = getListPath;
- let params = [{
- "BillState": app.globalData.selectBillState,
- "StartLoadTime": app.globalData.selectStartDate,
- "EndLoadTime": app.globalData.selectEndDate,
- "Customer_ID": app.globalData.selectCustomer_ID,
- "PageIndex": PageIndex,
- "PageSize": PageSize
- }];
-
- network.transfer_request(method, params, function(res) {
- let addarry = that.data.arry.concat(res.result)
- that.setData({
- arry: addarry
- })
- setColor(that)
- })
+ CheckedPageIndex = CheckedPageIndex + 1;
+ getCheckedOrderList(that, CheckedPageIndex, PageSize);
},
itemclick: function(e) {
diff --git a/pages/order/order.json b/pages/order/order.json
index 60cae6f..0cda146 100644
--- a/pages/order/order.json
+++ b/pages/order/order.json
@@ -1,5 +1,5 @@
{
- "navigationBarTitleText": "订单列表",
- "enablePullDownRefresh": true,
- "onReachBottomDistance": 50
+ "navigationBarBackgroundColor": "white",
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "订单列表"
}
\ No newline at end of file
diff --git a/pages/order/order.wxml b/pages/order/order.wxml
index dcdc62e..8170149 100644
--- a/pages/order/order.wxml
+++ b/pages/order/order.wxml
@@ -1,21 +1,52 @@
-
-
-
-
- {{item.Customer_Name}}
- {{item.BillState}}
+
+ 未审核
+ 已审核
+
+
+
+
+
+
+
+
+
+
+
+ {{item.Customer_Name}}
+ 流程状态:{{item.workFlowName}}
+
+
+ No.{{item.orderID}}
+ 发货时间:{{item.time}}
+
+
+
+
-
- No.{{item.ID}}
- 发货时间:{{item.LoadTime}}
+
+
+
+
+
+
+
+
+ {{item.Customer_Name}}
+ 流程状态:{{item.workFlowName}}
+
+
+ No.{{item.orderID}}
+ 发货时间:{{item.time}}
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/order/order.wxss b/pages/order/order.wxss
index ad478b5..bc58ad1 100644
--- a/pages/order/order.wxss
+++ b/pages/order/order.wxss
@@ -1,7 +1,39 @@
/* pages/order/order.wxss */
-page{
+
+page {
background:#EAF1F8;
- height: 100%;
+ height: calc(100%-10px);
+}
+
+.swiper-tab {
+ /* height: 30px; */
+ margin: 10px 20px;
+ text-align: center;
+ line-height: 30px;
+ background: white;
+ display: flex;
+ flex-direction: row;
+ border-radius: 5px;
+ border: 1px solid#2E8CF5;
+ overflow: hidden;
+}
+
+.swiper-tab-list {
+ height: 100%;
+ width: 50%;
+ font-size: 30rpx;
+ color: #777;
+}
+
+.on {
+ background-color:#2E8CF5 ;
+ color: white;
+}
+
+.swiper-box {
+ width: 100%;
+ display: block;
+ overflow: hidden;
}
.custmer_list_view_main{
@@ -10,6 +42,7 @@ page{
.scroll-views {
width: 100%;
+ height: 100%;
display: flex;
flex-direction: column;
}
@@ -70,11 +103,11 @@ page{
.chose{
width: 100%;
+ height: 40px;
position: fixed;
bottom: 0rpx;
}
-
.xinjian{
width: 160rpx;
height: 160rpx;
diff --git a/pages/saleForecastList/saleForecastList.js b/pages/saleForecastList/saleForecastList.js
index 47b0272..726bcdb 100644
--- a/pages/saleForecastList/saleForecastList.js
+++ b/pages/saleForecastList/saleForecastList.js
@@ -45,7 +45,8 @@ function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successact
orderState: true,
orderID: array[i].ID,
Customer_Name: array[i].Customer_Name,
- time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D')
+ time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D'),
+ workFlowName: array[i].DepartmentWorkFlow_Detail_Name,
}
getArr.push(dmo);
}
@@ -82,7 +83,9 @@ function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) {
orderState: false,
orderID: array[i].ID,
Customer_Name: array[i].Customer_Name,
- time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D')
+ time: timechage.formatTimeTwo(array[i].Date.substring(6, 19), 'Y/M/D'),
+ workFlowName: array[i].DepartmentWorkFlow_Detail_Name,
+
}
getArr.push(dmo);
}
@@ -168,9 +171,7 @@ Page({
console.log('点击取消了');
return false;
}
- // that.setData({
- // images
- // });
+
}
})
diff --git a/pages/saleForecastList/saleForecastList.wxml b/pages/saleForecastList/saleForecastList.wxml
index 7b66b70..f3c7de6 100644
--- a/pages/saleForecastList/saleForecastList.wxml
+++ b/pages/saleForecastList/saleForecastList.wxml
@@ -39,7 +39,7 @@
NO:{{item.orderID}}
- 流程状态:{{item.workFlowState}}
+ 流程状态:{{item.workFlowName}}