// 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, }) }) } 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], }, onLoad: function(options) { var that = this; let ID = Number(options.id); wx.getSystemInfo({ success: function (res) { that.setData({ winWidth: res.windowWidth, winHeight: res.windowHeight }); } }); }, /** * 滑动切换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 }) } }, //未审核订单滑动到底部加载 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); }, })