diff --git a/pages/orderList/orderDetail/orderDetail.js b/pages/orderList/orderDetail/orderDetail.js
index 8c30488..85cb936 100644
--- a/pages/orderList/orderDetail/orderDetail.js
+++ b/pages/orderList/orderDetail/orderDetail.js
@@ -1,47 +1,16 @@
// pages/orderList/orderBaseInfo/orderBaseInfo.js
-var network = require("../../../utils/net.js");
-const app = getApp();
-function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) {
- let getArr = [];
- let method = outStoreMethod;
- let params = [true, CheckedPageIndex, CheckedPageSize];
- network.newRequestLoading(method, params, function(res) {
- var array = res.result;
- if (array.length <= 0) {
- wx.showToast({
- title: '无数据更新',
- })
- if (CheckedPageIndex > 0) {
- CheckedPageIndex = CheckedPageIndex - 1;
- }
- return;
- }
- for (var i = 0; i < array.length; i++) {
- var dmo = {
- //是否显示审批按钮所在bottom
- billState: false,
- billType: array[i].BillType_Name,
- billID: array[i].Bill_ID,
- remark: array[i].Remark,
- time: timechage.formatTimeTwo(array[i].CreateTime.substring(6, 19), 'Y/M/D h:m')
- }
- getArr.push(dmo);
- }
- let arrLast = that.data.checkedDataArr.concat(getArr);
- that.setData({
- checkedDataArr: arrLast,
- })
- })
-}
+const app = getApp();
+var network = require("../../../utils/net.js");
+var timechage = require("../../../utils/dateTimeUtil.js");
+var LoadOrder = '/MainSystem/B3MiniProgramRpc/XuRpcs/Driver/CarRecordRpc/LoadOrder'
Page({
data: {
currentTab: 0,
winHeight: 0,
- winWidth: 0,
- detaileList:[1,1,3,4,5,6,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,7],
+ orderInfo:{},
},
onLoad: function(options) {
@@ -55,6 +24,15 @@ Page({
});
}
});
+ var method = LoadOrder;
+ var params = [ID];
+ network.transfer_request(method, params, function (res) {
+ res.result.LoadTime = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m');
+ res.result.OrderDate = timechage.formatTimeTwo(res.result.OrderDate.substring(6, 19), 'Y-M-D h:m');
+ that.setData({
+ orderInfo: res.result,
+ })
+ })
},
/**
@@ -81,18 +59,4 @@ Page({
}
},
-
- //未审核订单滑动到底部加载
- unCheckedScrollLower: function(event) {
- var that = this;
- UnCheckPageIndex = UnCheckPageIndex + 1;
- getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function(res) {});
- },
-
- //已审核订单滑动到底部加载
- CheckedScrollLower: function(event) {
- var that = this;
- CheckedPageIndex = CheckedPageIndex + 1;
- getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
- },
})
\ No newline at end of file
diff --git a/pages/orderList/orderDetail/orderDetail.wxml b/pages/orderList/orderDetail/orderDetail.wxml
index 22dc21d..2f48076 100644
--- a/pages/orderList/orderDetail/orderDetail.wxml
+++ b/pages/orderList/orderDetail/orderDetail.wxml
@@ -12,7 +12,7 @@
订货时间
- {{customerName}}基本信息
+ {{orderInfo.LoadTime}}
@@ -20,7 +20,7 @@
提货时间
- {{customerName}}
+ {{orderInfo.OrderDate}}
@@ -28,7 +28,7 @@
会计单位
- {{customerName}}
+ {{orderInfo.AccountingUnit_Name}}
@@ -36,7 +36,7 @@
购货客户
- {{customerName}}
+ {{orderInfo.Customer_Name}}
@@ -44,7 +44,7 @@
销售部门
- {{customerName}}
+ {{orderInfo.Department_Name}}
@@ -52,7 +52,7 @@
送货地址
- {{customerName}}
+ {{orderInfo.Address}}
@@ -60,7 +60,7 @@
运输车辆
- {{customerName}}
+ {{orderInfo.Car_Name}}
@@ -68,7 +68,7 @@
司机
- {{customerName}}
+ {{orderInfo.Driver_Name}}
@@ -76,20 +76,20 @@
联系方式
- {{customerName}}
+ {{orderInfo.Driver_Telephone}}
-
+
@@ -104,16 +104,16 @@
- 主数量:111{{mainNumber}}
+ 主数量:{{orderInfo.UnitNumber}}
- 辅数量:222{{secondNumber}}
+ 辅数量:222{{orderInfo.SecondNumber}}
-
+
@@ -129,7 +129,7 @@
存货名称
- 单据明细{{customerName}}
+ {{item.Goods_Name}}
@@ -137,7 +137,7 @@
报价数量
- 单据明细{{customerName}}
+ {{item}}
diff --git a/pages/orderList/orderList.js b/pages/orderList/orderList.js
index c5d3944..10d545a 100644
--- a/pages/orderList/orderList.js
+++ b/pages/orderList/orderList.js
@@ -2,112 +2,23 @@
const app = getApp();
var network = require("../../utils/net.js");
var timechage = require("../../utils/dateTimeUtil.js");
-var UnCheckPageIndex = 0
-var UnCheckPageSize = 10
-var CheckedPageIndex = 0
-var CheckedPageSize = 10
-var outStoreMethod = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/WorkFlowApproveRecordRpc/GetList'
-// 未审核订单列表
-function getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, successaction) {
- let getArr = [];
- let method = outStoreMethod;
- let params = [false, UnCheckPageIndex, UnCheckPageSize];
- network.newRequestLoading(method, params, function (res) {
- var array = res.result;
- successaction();
- if (array.length <= 0) {
- wx.showToast({
- title: '无数据更新',
- })
- if (UnCheckPageIndex > 0) {
- UnCheckPageIndex = UnCheckPageIndex - 1;
- }
- return;
- }
- for (var i = 0; i < array.length; i++) {
- var dmo = {
- //是否显示审批按钮所在bottom
- billState: true,
- billType: array[i].BillType_Name,
- billID: array[i].Bill_ID,
- remark: array[i].EndStateName,
- time: timechage.formatTimeTwo(array[i].CreateTime.substring(6, 19), 'Y/M/D h:m')
- }
- getArr.push(dmo);
- }
- let arrLast = that.data.unCheckDataArr.concat(getArr);
- that.setData({
- unCheckDataArr: arrLast,
- })
- })
-}
-
-// 已审核订单列表
-function getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize) {
- let getArr = [];
- let method = outStoreMethod;
- let params = [true, CheckedPageIndex, CheckedPageSize];
- network.newRequestLoading(method, params, function (res) {
- var array = res.result;
- if (array.length <= 0) {
- wx.showToast({
- title: '无数据更新',
- })
- if (CheckedPageIndex > 0) {
- CheckedPageIndex = CheckedPageIndex - 1;
- }
- return;
- }
- for (var i = 0; i < array.length; i++) {
- var dmo = {
- //是否显示审批按钮所在bottom
- billState: false,
- billType: array[i].BillType_Name,
- billID: array[i].Bill_ID,
- remark: array[i].Remark,
- time: timechage.formatTimeTwo(array[i].CreateTime.substring(6, 19), 'Y/M/D h:m')
- }
- getArr.push(dmo);
- }
- let arrLast = that.data.checkedDataArr.concat(getArr);
- that.setData({
- checkedDataArr: arrLast,
- })
- })
-}
+var getOrderList = '/MainSystem/B3MiniProgramRpc/XuRpcs/Driver/CarRecordRpc/GetList'
Page({
data: {
- checkedDataArr: [1,2,3],
- unCheckDataArr: [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],
- currentTab: 0,
- winHeight: 0,
- winWidth: 0,
+ orderList:[],
},
- /**
- * 滑动切换tab
- */
- bindChange: function (e) {
- var that = this;
- that.setData({
- currentTab: e.detail.current
- });
-
- },
- /**
- * 点击tab切换
- */
- swichNav: function (e) {
+ onShow: function (options) {
var that = this;
- if (this.data.currentTab === e.target.dataset.current) {
- return false;
- } else {
+ var method = getOrderList;
+ network.transfer_request(method, [], function (res) {
that.setData({
- currentTab: e.target.dataset.current
+ orderList: res.result,
})
- }
+ })
},
+
//点击进入详情页面
transToOrderDetail: function (event) {
var itemID = event.currentTarget.dataset.detailitemid;
@@ -116,51 +27,5 @@ Page({
})
},
- onShow: function (options) {
- // this.setData({
- // checkedDataArr: [],
- // unCheckDataArr: [],
- // })
- var that = this;
- wx.getSystemInfo({
- success: function (res) {
- that.setData({
- winWidth: res.windowWidth,
- winHeight: res.windowHeight
- });
- }
- });
- // UnCheckPageIndex = 0;
- // CheckedPageIndex = 0;
- // getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function (res) {
- // getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
- // });
- },
-
- //未审核订单滑动到底部加载
- unCheckedScrollLower: function (event) {
- var that = this;
- UnCheckPageIndex = UnCheckPageIndex + 1;
- getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function (res) { });
- },
-
- //已审核订单滑动到底部加载
- CheckedScrollLower: function (event) {
- var that = this;
- CheckedPageIndex = CheckedPageIndex + 1;
- getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- // onReachBottom: function () {
- // var that = this;
- // if (this.data.currentTab === 0) {
- // UnCheckPageIndex = UnCheckPageIndex + 1;
- // getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize, function (res) { });
- // } else {
- // CheckedPageIndex = CheckedPageIndex + 1;
- // getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
- // }
- // },
+
})
\ No newline at end of file
diff --git a/pages/orderList/orderList.wxml b/pages/orderList/orderList.wxml
index e2ec246..90d0da8 100644
--- a/pages/orderList/orderList.wxml
+++ b/pages/orderList/orderList.wxml
@@ -1,47 +1,28 @@
-
- 未确认
- 已确认
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- {{item.orderID}}仙坛食品有限公司
+ {{item.Customer_Name}}
- 业务员:梁方刚{{item.workFlowState}}
+ 业务员:{{item.Employee_Name}}
- 数量:1000{{item.Customer_Name}}
+ 数量:{{item.TotalNumber}}
- 日期:2018.2.9{{item.time}}
+ 日期:{{item.LoadTime}}